Compost is a pretty word for 'rotting vegetable matter and other stuff'. It's darned good for the crops. If you recall your biology classes, you'll know that plants get their nutrients from air, water, and soil. There's not much you can do about altering the composition of your local air and water (except perhaps to move away from the cities), but you can alter the soil by adding what are usually called 'soil amendments'. Of these, compost is the one you can make at home.
If you get involved in the organic gardening world at all, you'll find a number of people who will each tell you at length their version of how to make the best compost. There are others, who can often be found via small magazine advertisements, who will sell you barrels and crates and drums designed to make compost. Without denigrating these folks too much, all that discussion and equipment is not really necessary. If you leave stuff to rot, it's good for the plants it's rotting next to. Among the most successful organic gardeners are those that merely dump salad leftovers back into the garden, and everything will do quite well, thank you.
That said, here's one method of how to make compost:
Save all your potato peelings, leftover salad greens, slimy stuff from the bottom of the vegetable drawer, coffee grounds, mouldy bread, and anything else vaguely vegetable. If you happen to be raising chickens, most of this vegetable matter can go to them to lower your feed costs. But whatever's left over is good for the compost. Don't throw in meat scraps unless you don't mind your neighbourhood becoming a main stop for stray cats. (Or coyotes, in some places.)
Pile up all this organic stuff along with any weeds and other garden greenery. This is the start of the compost pile. Make it a few inches thick.
On top of the 'greens' you want to add a similar layer of 'browns', such as horse manure. If you lack animals, you can omit this, but your compost won't process as fast or be as high in nitrogen. Don't use dog, cat, or human poo, as these spread diseases. For these it is best to use a 'Dog-waste Digester'.
On top of the 'greens' and the 'browns' put a layer of nice fresh dirt.
Keep the whole thing moist. Water it whenever you water your garden.
Whenever you need exercise, or you can't come up with convincing excuses for putting it off any longer, take a shovel and a long-handled garden fork and turn over the pile. This involves pulling off one layer at a time, dumping it on a second pile, and mixing up the whole thing.
When it's looking like dirt (nice thick rich yummy-smelling dirt) spread it back on the garden. Your crops will thank you.
If you don't have acres of land, you can make compost in a covered bucket. Just be sure to drill some holes in the bottom for air and for the water to drain off, as you want it to stay moist, not be a slimy mess.