What causes heartburn?

And, how come some people get it but others do not? Even kids/teens get it, right? Not just adults.