Once hatched, dragons must be placed into a Habitat. Different types of Habitats exist for each different element, and a dragon must be placed into a Habitat that corresponds with its own element. Dragons with more than one element can be placed in either type of Habitat.
NOTE: The Ice and Metal Habitats need help from your friends in order to be opened, like other buildings, as the Stadium. If you can afford (or don't have any friends), open them with . Large Ice and Metal habitats can be opened without hiring friends or using gems on PC.
In an update, habitats get more expensive as you build them, price will eventually changes to gems.
Habitats can be used to earn XP at a faster and cheaper rate than that of a Farm. If you aren't really into collecting dragons, or just want to level up quick to be able to use items that unlock at higher levels, you can use your disposable income to level up this way. This is best accomplished when you have large amounts of recurring disposable income.
Note 1: This process may involve building, then immediately selling/storing the habitats (I'd recommend storing them), as you may run out of space. This process is solely geared toward earning the most XP possible at the lowest cost possible, and is not considering how much each habitat can hold from Dragons.
Note 2 : Depending on your level and gold income, it may be more beneficial to look at the chart for Big Habitats, as the Big Nature and Big Sea offer decent XP Per Minute for a lower initial cost.
Note 3: It may seem like a War Habitat would get you more, but consider this; if you were to build one War Habitat, it would cost you 1.1M Gold, and would only provide 2.75M XP at the end of 4-hours. However, if you were to build two Light Habitats simultaneously, it would only cost you 900K Gold, and would earn you 4M XP at the end of the same 4-hours. So you are paying 200K Gold less, and earning 1.25M XP more.
There are so many habitats(or less :V) that you are lazy to collect. 1 click 1 kill... ah sorry... 1 click to collect all habitat you have just a few seconds. =.=