It's a very innocent question. In fact every culture has its rich heritage, its own stories, depending upon the customs of that culture. But there are some stories and some myths, which have gained worldwide fame, and those stories became so popular that almost every man on this earth knows it. From these stories some famous stories are Aladdin, Hercules, a cow who is having the world on her horns.
Similarly, there is a story about the fairy who put money under the pillow of the child whose tooth had just fallen out. Basically this story became popular because of parents.
When a child starts to lose his early teeth he feels some pain. But to change his focus from pain to pleasure, parents usually tell this story. And it is only a myth, not real at all.
Usually when parents tell their child that they should keep their tooth under their pillow and the fairy will take the tooth and leave the money under their pillow, the child does this because of curiosity.
And parents put the money under the pillow of that child, so that his heart will not break. So it is just a story. There is no reality in it.