Minecraft wiki entry for Tree, associated text: A large tree that was generated on a small floating body of land.
A tree that was naturally generated in a closed-over area of land, with light provided by a hole in the ceiling.
A tree generated in a cave, with light provided from lava.
Trees can even generate in ravines.
This tree generated right next to a natural lava pool and started to burn shortly after.
A tree generated on a dirt vein in a basin.
Another ravine tree.
Sugar cane replacing leaves. This can be easily replicated by finding sugar cane and planting an oak sapling 1 block away as seen in the image. Then use some bone meal on sapling and let the tree grow.
A tree growing on a clay block, caused when the clay replaced the dirt.
This tree generated on a dirt vein in a desert, which was exposed by a basin.
A tree that generated in ravine, next to the lava and mineshaft.
Tree which generated under a cliff in windswept hills biome.
Sometimes, trees can grow through blocks placed by player.