The Big Bang theory is the one that most physicists accept as the beginning of the cosmos. It is believed that whole energy ad mass of the universe was once concentrated in a tiny spot with incredible small size 13.7 billion years ago, and for some reason this spot began to expand exponentially to form solar systems, galaxies and cluster of galaxies. The book of the history of the universe is not written yet. No one really knows how this is gonna end.
There are actually 3 reasonable theories to describe the end of the cosmos. First one is the big crunch according to which, the universe will stop expanding and it will start collapsing under its own gravity. There will be eventually a day that all matter and energy will collapse back to the same tiny spot from which all began, maybe to cycle through another big bang.
The second theory is the big freeze. Scientists have measure that the rate of expansion that we experience right now is not decreasing but rather increasing. This may cause the galaxies and the stars to expand so fast that they will reach the universe's escape velocity, therefore the gravity will not pull them back. The expansion will never end and therefore everything will freeze in absolute zero.
Finally, its the big rip. According to this theory, the expansion will happen to all things that have space within, even atoms. So, the clusters of galaxies will break apart, and the galaxies will break apart, and then solar systems will break apart, and our earth will break apart, and even us humans will break apart, and all atoms that make up matter will break apart.
Professor Michio Kaku in one of his excellent videos speaks about the end of the cosmos