Very simplified. India won independence from the British after WW2 (basically the British were too busy rebuilding and the US was pressuring most colonial govts into divesting their colonial holdings). The original intent was a single country but there was too much religious tension/separatism. So Pakistan (East and West) separated from the current India basically forming a Muslim led country from the Hindu dominated India.
However Pakistan’s administration was dominated by Western Pakistan treating the East as a second class colony. Eventually the East fought a war and separated themselves into the country now known as Bangladesh.
Long version VERY VERY easily searched (wiki gives a useful summary too long for ELI5)
Latest Answers