A) Find out what your soil needs
If you're not sure what kind of soil you have, begin with a test from your local Co-operative Extension Service (usually listed in the "Government" section of the phone book under either the "Agriculture" or "Education" heading). They will tell you how to take a soil sample, and will usually test it for a minimal charge.
If you have heavy clay, you need to add organics that make the soil "lighter", so air circulates better and water drains more freely through it. A little sand can help, much better is organic matter in the form of composted leaves and vegetables; aged manure from horses, cows, chickens, and goats; peat; vermiculite; or gypsum. The ideal blend is 10% sand, 40% to 50% clay, and 40% to 50% organic matter, mixed evenly together into a crumbly brown mass that holds moisture but isn't soggy.
If you have sandy soil, you need to add things that will provide nutrients and hold moisture. Compost and organic matter of the types described above, plus a little clay, are ideal.
B) Add lots of organic matter
No matter what kind of soil you have, you can't go wrong by adding organics - compost, well-rotted manure, peat moss - frequently and heavily. Every time you prepare to replant annual beds or vegetable gardens, take the time to work in as much organic matter as you can lay your hands on.
When you weed your perennial and shrub borders, work organic material into the soil (being careful not to dig up the plant's roots!). When you mulch before frost, apply 4 to 5 inches of good organic material. With each watering the organics will be dispersed, and eventually your soil will be rich and easy to work with.