Jesus told stories to help us understand how He wants us to live. Instead of giving a list of do's and don'ts he tells stories to help make a point.
The Parable of the Two Builders, (also known as the parable of the wise man and the foolish man) is a parable Jesus told from the Sermon on the Mount in the Gospel of Matthew (7:24–27).
The Parable of the Two Builders
24 “Therefore everyone who hears these words of mine and puts them into practice is like a wise man who built his house on the rock. 25 The rain came down, the streams rose, and the winds blew and beat against that house; yet it did not fall, because it had its foundation on the rock. 26 But everyone who hears these words of mine and does not put them into practice is like a foolish man who built his house on sand. 27 The rain came down, the streams rose, and the winds blew and beat against that house, and it fell with a great crash.”
We learned that a parable is a story that has a hidden message or moral that Jesus was trying to teach the people.
Here He wants us to hear/learn His words and then put them into practice. By learning and obeying we will have a strong foundation and we'll become wise. The rock is obedience and the house is our life.
The choice of being wise or foolish is up to each one of us.