During the early First Era, the Atmoran conquest of Skyrim forced the native Snow Elves into hiding. Many of them took refuge with the Dwemer, a subterranean race of mer. In return, the Dwemer ordered the Snow Elves to ingest a toxic fungus that would blind them. With no other option, they agreed but eventually the Dwemer betrayed the Snow Elves further and enslaved the race.
Generations later, the Snow Elves devolved into a twisted race known as the Falmer. Eventually, the Falmer rose up against their oppressors and overthrew the Dwemer. They fled into a huge cavern named Blackreach and for decades fought against the Dwemer, completely unbeknownst to the Nords above ground.
The war ended when the entire Dwemer race mysteriously vanished.