An exoplanet is a planet that orbits a star other than the Sun. More than 1800 exoplanets have been discovered so far, mostly within the Milky Way. The habitability of exoplanets depends on factors like their location within the habitable zone of liquid water, and having an atmosphere that supports life. Exoplanets can be discovered through direct detection as they pass in front of their star, or indirectly by the gravitational effects on the star. Studying exoplanets helps understand the diversity of planets and could reveal if life exists elsewhere.