A habitat is where something resides. Such as a desert or a forest.
A habitant does not exist. An "inhabitant", however, does.
An inhabitant is the something that resides in a forest, desert, cave, etc.. An example would be "The inhabitants of the cave ate saber-tooth tigers for breakfast, lunch, and dinner."
The "inhabitants" are in their "habitat", "the cave".