Pokémon breeding can be very simple or very complicated depending on what you want to achieve. Firstly, breeding lets you create more of the same Pokémon. Handy if you want to share your starter Pokémon or version-exclusive Pokémon with other people. Secondly, it can be used to create truly exceptional Pokémon.
How it Works
Breeding can be done once you reach the Pokémon Nursery found in Route 3 or the one in Bridge Field, within the Wild Area. They both function the same, so use either (or both). When you speak to the nursery worker, you can leave up to two Pokémon in the nursery's care, at the cost of 500 Poké Dollars per Pokémon.
These two Pokémon will breed if the following critera are met:
Both Pokémon are capable of breeding. This might seem obvious, but some Pokémon cannot breed, full stop. This includes virtually all Legendary Pokémon, as well as baby Pokémon (like Toxel or Togepi).
One of the Pokémon is male and the other is female. There is a valuable loophole: Ditto, the Pokémon, can be substituted for any male or female Pokémon. However, you cannot breed two Ditto together.
The two Pokémon belong to compatible egg groups. This one's a bit harder to figure out. Every Pokémon belongs to one or more egg groups--and they can only breed with Pokémon from the same group(s). Eg. Grookey is in the "Field" and "Grass" groups.
On the Right Track?
If you're unsure, speak to the nursery owner and ask about your Pokémon. So long as she doesn't say "the two prefer to play with other Pokémon more than with each other", you've done it correctly.
After dropping off your Pokémon, run around for a while. Eventually, if you speak to the nursery owner again (when she's got her hand on her chin), she'll ask if you want to receive a Pokémon Egg from her. Answer "yes", unless you've changed your mind.
To increase the rate of getting eggs, you can breed two Pokémon of the same species and/or Pokémon with different trainer ID numbers. You can also obtain the Oval Charm from Morimoto in the hotel in Circhester after beating the game.
Once you've got an egg, simply keep it in your party and travel around. After a certain number of steps--the number of which depends on the Pokémon species--the egg will hatch. You can speed up the process if you have a party Pokémon with Flame Body, Magma Armor or Steam Engine.
The Pokémon that hatches from the egg will have the following properties:
It will be the same species as the female, but unevolved (or the male, if you bred it with a Ditto). Note that some Pokémon may require a specific Incense item to be held, in order to hatch the unevolved form.
By default, it will have a completely random Nature, just like a Pokémon met in the wild. However, if one of the parents is holding an Everstone item, the child will inherit that parent's Nature 100% of the time.
There's a 60% chance it will have the female's Ability (or the male's, if you bred it with a Ditto). This is also true for Hidden Abilities. The other 40% of the time, it will have one of its normally available Abilities (with a 20/20 split if it has two).
Certain moves that the parents have, which the child cannot learn by leveling up, may be inherited--these are called Egg Moves. Brilliant Pokémon or Pokémon from raids may also have Egg Moves. Moves currently shared by both parents may be inherited as well.
A total of 3 IVs will be inherited from the parents. Which stats and which parent to inherit from are randomly assigned. If one of the parents is holding a Destiny Knot item, a total of 5 IVs will be inherited instead! The remaining IV(s) will be random.
Lastly, the child will inherit the Poké Ball that the parents were caught with. If the parents have different balls, the chance will be split 50/50. If Ditto is a parent, it will be in the non-Ditto parent's ball. Master and Cherish Balls will not pass down.
What is not affected by breeding:
Shininess (but any hatched Pokémon has the potential to be shiny).
The ability to Gigantamax.
TMs and TRs learned by the parents.
The parents' EVs.
Sharing Egg Moves
New to Sword and Shield, if you leave two Pokémon of the exact same species, the two Pokémon will share Egg Moves that they know with each other. However, they must have space to learn the move(s).
Also, the process isn't instant. So you may have to run around for a while, before the Pokémon finish teaching each other their secret move(s).