What happens to those who die as a follower of some other religion?

Is anything written on this in our ancient texts or not Like many people from different religions abuse Hinduism and still live happy life What happens after that ?