Dragon Eggs are placeable entities that turn into baby dragons; they are a drop from stage 4-5 female dragons, used to hatch tamed baby dragons.
To obtain a dragon egg, one must seek out a female 4+ dragon, which can be found sleeping in treasure-filled caverns deep underground. Once you've found one, kill it and right click the body with an open hand to collect loot, and it will drop a dragon egg of random color depending on the species. As of the 1.8.0 update, there is a way to differentiate between an untamed male and a female dragon. Male dragons have patched wings and straight horns, while females have curved horns and plain wings.
Dragon Eggs will hatch into baby (stage 1) dragons that are tamed as soon as they hatch (as long as the player is near the egg), but cannot be ridden.
The player can level up a dragon using the Dragon Meal. Once a dragon reaches stage 3 (can be checked by interacting with the dragon while sneaking), it becomes able to be ridden by a player.
Dragon Eggs will hatch into a stage 1 dragon of the same color. Fire Dragon Eggs and Ice Dragon Eggs have different conditions for hatching.
Fire dragon eggs (Red, Gray, Emerald & Bronze) must be placed within a fire to start the hatching process. Once the egg starts moving, it will take a few minutes to hatch.
Ice dragon eggs (Blue, Sapphire, White & Silver) must be placed in water that could be surrounded by ice. If the water around the egg freezes, then it will hatch in a few minutes. (In some versions just putting in water works)