A Habitat is a subset of the biome;  a specific locality with a particular set of conditions and approximately adapted community of organisms. E.g. fresh water ponds, slow-flowing streams/river, rock, hedgegrowmn
A Niche is a subset of a habitat; a restricted area where each organism lives within the habitat. E.g. in a river, under stones, in the mud bank or open water. Could also mean an organisms function within a habitat. This function may cross habitat and sometimes biomes.