Before the Hubble telescope was built 25 years ago, astronomers were only aware of the planets in our solar system. Now, we have identified nearly 2,000 exoplanets, and are discovering more and more evidence that there is life somewhere in our universe. In honor of Hubble's 25th anniversary, NASA told Space.com exactly how Hubble is taking us closer to detecting extraterrestrial life:

"I do think there's life out there somewhere," said MIT astrophysicist Sara Seager. "Our galaxy has hundreds of billions of stars, and our universe has upwards of hundreds of billions of galaxies. So the chance for life to exist out there somewhere appears to be inevitable. A harder question is: is there life somewhere near here? A planet orbiting a nearby star that we can actually look at closely? That's a much tougher question."

Although Hubble isn't in the business of detecting the exoplanets themselves, according to Seager, Hubble can potentially detect extraterrestrial life by analyzing the atmosphere of exoplanets. Each gas that can be found in a planet's atmosphere has a signature light signature, so by determining which colors are taken out of the white light spectrum, astronomers can detect which gases are in the atmosphere.

"The analogy I really like is looking at a rainbow," said Seager. "If we could look at the colors very, very closely, we would see tiny dark lines, many of them spread throughout the rainbow. And those lines are caused by gases in the atmosphere, absorbing radiation. They're essentially taking light out of the rainbow. And with Hubble we do the same thing, we take light from a star or a planet and spread it out, and we look for places in the colors where light is missing."

Many astrobiologists believe that the detection of methane is the key to discovering extraterrestrial life, so if Hubble can detect methane, it can potentially discern planets that host alien life forms. As of now, Hubble can only detect light from giant gas planets, which would have little to no chance of hosting extraterrestrial life. But NASA scientists hope that in the near future, advancements will allow them to perform this procedure on smaller, rocky, Earth-like planets.

"What I'd like is to start my career as an astronomer and end it as a biologist," said Harvard astronomer David Charbonneau.