Maybe you think that composting isn't practical or useful because you live in an apartment, but think again. There are plenty of good reasons to try composting, even if you don't have a yard or garden at all. Here are some considerations for urban composting.
First, you want to choose from the many small compost bins for sale. While proper composting defeats odors on its own, you can be extra safe by investing in one of the many plastic compost bins with a charcoal filter. It's not a good idea to use old Tupperware or other similar containers. You'd be amazed how many fruit flies you can attract in a small apartment with these impromptu composters.
The food scraps or leftovers that you would throw away or put through the garbage disposal can almost all be composted. This includes everything from unpopped popcorn bits to leftover pizza crusts. You can also compost crushed egg shells, seed hulls, and nut shells, and even things like peach pits. Some people have claimed success composting shredded paper, hamster cage bedding, dryer lint, stale beer, and the stuff in your vacuum cleaner.
There are some things you should not compost, whether you're in the city or elsewhere. These include old magazines (because the clay content keeps the paper from breaking down efficiently), detergent, meat, bones, and chicken skin.
You'll need nitrogen for the proper breakdown of compost, and the easiest way to do this is to add about a half-inch layer of dead, crumbled leaves (it shouldn't take much for a small composter) for every two or three inches of food waste. The overall composition should be moist, but not wet or slimy. Coffee grounds are great in compost because they keep the environment acidic, and if you add worms to your compost (not as icky as you may think!), you'll find they love used coffee grounds. But don't use ashes, because they are too alkaline and will slow the process down.
Whether you use one of the nifty rotating compost bins, or one of the simple plastic compost bins that doesn't have a crank, keep it in a reasonably ventilated area, out of sunlight. The composting process generates heat, and setting the composter in the sun could actually make it overheat, killing beneficial micro-organisms. With a compost tumbler, crank it every few days to turn the contents. With non-rotating composters, dig in with a gardening fork or something similar and stir up the contents every few days to keep the process moving along efficiently.
Check your compost after about six weeks as long as you've kept it reasonably moist and turned it regularly. If you have a crumbly, nearly black substance that resembles dark dirt and smells slightly sweet, then you have compost! If you don't have a balcony herb garden or house plants that could use a nice, loose half-inch layer of compost, you should have no trouble giving it away or even selling it to home gardeners. Compost is awesome organic fertilizer, and is highly coveted by urban gardeners who have to do a lot with a small space.