Matthew 7:24-27
24 Therefore whosoever heareth these sayings of mine, and doeth them, I will liken him unto a wise man, which built his house upon a rock:
25 And the rain descended, and the floods came, and the winds blew, and beat upon that house; and it fell not: for it was founded upon a rock.
26 And every one that heareth these sayings of mine, and doeth them not, shall be likened unto a foolish man, which built his house upon the sand:
27 And the rain descended, and the floods came, and the winds blew, and beat upon that house; and it fell: and great was the fall of it.
The Grace New Testament Commentary - Matthew 7:24-27
7:24-27 Jesus concludes the sermon with a story that involves a contrast between two builders and two foundations. The foolish builder represents the Pharisees who anchor their destiny to their own interpretations and practice of the Law. These in turn represent a foundation of sand, which suggests instability, danger, and impermanence. The wise builder represents hearers of Christ's teaching who anchor their destiny to Christ's interpretation of the Law. His teachings are compared to a rock foundation, which suggests stability, safety, and permanence. A foundation of sand provides no safety for the winds and floods of future judgment. The house built on such a site will collapse in a time of strong winds and floods. The rock foundation, on the other hand, will secure the occupant from harm.
Anyone who "hears these sayings of mine and does them" is promised safety and stability in withstanding the storm of God's judgment. Disaster awaits those who do not comply with Jesus' instructions to hear and do His sayings.
The only safe course is to act on what Christ says: enter the narrow way by rejecting the false teaching of the Pharisees. Although total compliance to the demands of the Law was the way into the kingdom, the wise would be able to recognize the impossibility of such an undertaking as they contemplated obeying the higher standards Christ taught.