We've said it before, and we'll say it again: when you've got a collection of like a gazillion stories, there's no single ending and it can be hard to pick out patterns. Here are a few you'll see repeated, though:
We will note that, in Andersen-land, most "happy" endings involve death and having faith in the Christian God so that you can go to heaven. Which is okay by us! But we wouldn't mind if some of his tales ended with kittens and ice cream either.