Bali Maharaja was the grandson of Prahlada. He was as powerful as his grandfather and conquered the three worlds. Since the demigods now did not have a place for themselves, they asked Lord Vishnu to help them get back the heavens from Bali.
Lord Vishnu took the form of a young brahmana dwarf called Vamana and went to the arena where Bali was performing a sacrifice.
Seeing the brahmana boy, Bali Maharaja got up and welcomed Him. He then asked Lord Vamana, "What can I give you in charity, dear brahmana? Please ask me for anything and it will be yours!"
Lord Vamana replied, "I just want three steps of land."
Bali Maharaja thought this was too little to-give, so he repeated, "I can give you anything you want. I am the lord of all the three worlds. You can ask me for much more than three steps of land."
But Vamana insisted, "I just want three steps of land."
So Bali said, "So be it."
Then Lord Vamana took one step. But His step was so huge that it covered the whole earth! His second step covered the skies! There was no place for Him to keep His third step, so He asked Bali, "Where shall I place My third step? You promised Me three steps and I have already covered all that you own!"
Bali Maharaja then knew that this was no ordinary brahmana boy, but Lord Vishnu Himself.
So he took off the crown from his head and offered it to Lord Vamana, praying, "Lord, please place Your third step on my head and accept me as Your servant!"