The TRAPPIST-1f is in the TRAPPIST-1 system discovered recently with seven planets. Three of them are said to be in the habitable zone. But the data says that the average temperature on the TRAPPIST-1f planet is -54°C. How is it considered habitable then?
None of the TRAPPIST-1 planets are "considered habitable"; we don't know nearly enough about them to say that (any news article which referred to the planets themselves as "habitable" needs firm correction). Three of them are within the habitable zone of the star, which is defined as the region around the star where liquid water could potentially be found on a planet.
A planet with an average temperature of -55C will not be dominated by liquid water, but -- given that TRAPPIST-1f is likely tidally locked, showing the same face to the star all the time -- on one side of the planet the sun is always in the sky, greatly increasing the temperature on that side, particularly in the region where the sun is most directly overhead. Depending on the atmospheric composition, it's likely that water, if present, would be liquid there.
The temperature estimate is based on no atmosphere. For instance, Earth, without our atmosphere, would have an average temperature of -20°C . The equator should be warmer, and any atmosphere will also add heat. Also, the objects are most likely tidally locked, which means that a single side of the planet will always face it's star, making it even warmer in some places.