Forest consists of many micro habitats because A habitat is a place where species live. As a forest is home to many different species of plants and animals, it is made up of many habitats. The trunks of trees, branches and leaf litter are all habitats to different species.
Each of these habitats in turn can be home to many different smaller life forms or microhabitat . For Example , when a woodpecker pecks a hole in a tree trunk, becomes the home of an owl very soon, microscopic plants and organisms spring up in the decaying tissues of the hole and insects come to feed on the organisms. If water collects in that hole it becomes a tiny pond the life there will be aquatic and include mosquitoes round worm even small frogs or toads.
In short, the hole made by woodpecker gradually becomes world in itself, which exists inside tree that is a part of a forest or in other words a micro habitat.