“The descendants of Noah … said: ‘Come, let us make a city and a tower, the top whereof may reach to heaven; and let us make our name famous before we be scattered abroad into all lands.’” https://www.newadvent.org/cathen/15005b.htm
God did not like that, so He brought into existence multiple languages. Thus, humans were divided into linguistic groups, unable to understand one another. The Tower of Babel was a punishment.
Was the tower real? Yes. It stood in Babylon in what is modern Iraq. The City of Cities, as it was called by the people of the time, eventually collapsed.