For bottles with formula:
Invest in a bottle warmer. This is probably the easiest way to heat up a bottle of formula, especially for middle-of-the-night feedings when you don't want to wait for water to heat up on the stove. You can buy a warmer at stores like Buy Buy Baby and Babies R Us, and be sure to follow the directions closely to avoid overheating.
Place the bottle in warm water. You don't need to boil water on the stovetop -- you can easily overheat the formula this way and it's not safe with plastic bottles, which can melt in the extreme heat. Instead, warm some water on the stove (or run some warm water from the tap into a bowl), and submerge the bottle in the warm water until it's room temp.
Skip the microwave. This will distribute heat unevenly and increase the chances of burns. It can also deplete the nutrients in the formula.
For bottles with breast milk:
Don't heat, just warm. Too much heat can destroy the milk's enzymes and immunizing properties, so simply warm the bottle gently before giving to baby.
If breast milk is frozen, run the bottle under some warm water to defrost it.
Place it in a bowl of warm water. As the water cools, replace it with more warm water until the milk is warmed to room temperature.
Never use the stovetop or microwave. Boiling or microwaving is dangerous, since the milk can heat unevenly or overheat.