The subject of garden soil is conversational codeine to most people. Yet refer to that brown stuff as "dirt" in the wrong company and be prepared to have some thrown in your face.
"It's soil, you moron, not dirt!" an obviously superior gardener recently informed me. "Only idiots like you call it dirt."
Soil, dirt or whatever you want to call it is the critical backbone of the garden, so there is some reason behind such semantic fanaticism. We may take it for granted, but that stuff underneath our feet is alive: a complex community of fungi, bacteria, minerals, organic matter, water and microscopic creatures that is worthy of our respect and awe.
When it comes to growing veggies, you don't need to be a soil scientist to get the value of good dirt. The logic is simple: Healthy soil grows lush and bountiful food-producing plants. And lousy soil? Well, good luck with that. Plants get what they need from fertile earth - no need to apply fertilizer religiously. They'll also have fewer problems with pests and disease down the road. That means more time for you to enjoy your garden and less work toiling in it.
Most gardens begin with soil that is somewhere between okay and horribly wrong. When it comes to growing food, gardeners strive for rich and crumbly loam. Chock full of nutrient-rich organic matter, loam retains moisture yet drains easily. When you dig into it, expect to find lots of worms and other creepy crawlies. On a pH scale, loamy soil tends to measure somewhere around neutral. This is important since most vegetables won't grow in anything that is extremely acidic or alkaline.
Bad soil, on the other hand, tends to be compacted and hard to dig or dusty and dry. Water either drains too freely (as is the case with sand) or poorly (as with clay, which puddles for ages after a rain). Your ticket to brag-worthy loam is to add in compost, and lots of it. Better yet, build a supportive structure from old wood or cement blocks and pile it on top of dirt that seems beyond repair.
Compost is easy to make and a continuous source of free soil conditioner for your garden. Regardless of what's in the ground now, add new compost yearly to keep the soil texture and fertility in good standing.
If you don't already have a bin on the go, you'll need to buy store-bought compost in the meantime, although what you'll get from a bag is not exactly the same thing. Look for mushroom compost, manure (derived from organically farmed animals) or leafmould, but stay away from topsoil since this can come from literally anywhere and mean just about anything.
Container soil is an entirely different creature altogether. What's good in the garden is a disaster in a pot, slowly turning into a hardened clump that will eventually suffocate your plant and rot the roots regardless of how fluffy it was in the ground. Opt for potting or container mix, a soil-like substitute designed to hold moisture well yet drain freely, all the while remaining light and airy in the pot.
The good news is that this comes from a bag; you won't need to work to make it good.
The bad news is that commercial mixes vary widely in both quality and price. This is the one place where it really pays to spend a bit of money. A good potting mix will contain organic matter such as compost, rice hulls, wood chips and/or worm castings to provide nutrients, perlite, vermiculite and/or sand to prevent compaction and increase drainage and coir (a renewable resource and peat substitute derived from coconut husks) to absorb water.
Some mixes contain slow-release fertilizers. But if you are going organic, look for ingredients such as seaweed, manure or mushroom compost in place of chemicals.