What to buy
Use a sterile, well-drained soilless mix sold for seed starting. Clemson Extension advises against bagged topsoil, vegetable-garden mixes and ordinary potting mixes for the job (source). The RHS recommends peat-free seed compost, or a sieved peat-free multi-purpose compost (source).
Why not garden soil
Oregon State Extension notes that backyard soil is dense, carries weed seeds, is not pasteurised (so it can cause seedling disease), drains poorly and can form a crust seedlings struggle to push through (source).
A simple home mix
The same Oregon State article gives a recipe of equal parts: one third pasteurised soil or compost, one third sand, vermiculite or perlite, and one third coconut coir or peat moss. A simpler version is coir or peat moss with about half as much perlite, vermiculite or sand. If you bake soil to pasteurise it, they say to bring it to 180°F (82°C) and hold it there for 30 minutes without overheating.
Most home gardeners find a bag of shop seed mix less work than making their own.
Peat pellets
Pellets are dry discs that swell when watered. Open the top, set one or two seeds in and keep the pellet moist; once roots show at the sides, move the seedling on in its pellet or pot it up. They are convenient, but small and quick to dry, so check them daily.
Moist, not wet
Wet the mix before you sow so it is evenly damp, then firm it gently. See how often to water.