First, you have to figure out what kind of soil you have. Take some soil and get it wet and squeeze it in your hand. If the soil falls apart, you probably have sandy soil, if it stays in a ball and feels greasy, it is probably more clay. You can make your own or buy it at the store. There are lots of microbes in compost that protect plants from disease, kind of like their vitamins.
Compost can be added to either a sandy soil or clayey soil, it fixes both.
There are entire books written about composting, check your local library for detailed information. Composting is easy and cheap. If you are just starting out and don't want the hassle of making compost, you can get topsoil with compost at a garden center. Even gas stations and grocery stores sell topsoil, humus and compost in the springtime. Her work has appeared in print publications such as The Tightwad Gazette.