how did nationalism topple empires?

An empire is made up of a large territory. When parts of this territory wanted to become independent, they fought the empire and won.