The habitable zone is determined based on the distance of a planet from its star and the star's characteristics. The distance must be within a range where it is neither too close to the star (resulting in extreme heat) nor too far (resulting in extreme cold).