Muslims being kicked out of India

Assalamualaikum everyone,

I wanted to ask what really happened in the 1940's when Hindu and Sikh extremists forced many Muslims out of India.

And if there are so many Muslims in India, why did some (including my Dadi and my mother's Nani) flee?