Jesus is saying that we need to hear and do the things that he has asked us to do. If we do, we have a solid foundation that won't fall when the storms of life come. If we don't, then we have no such promise and we will crumble under pressure. We also show our love for the Savior by keeping His commandments and serving other people(John 14:15).
Another great scripture that explains what the rock is, is found in Helaman 5:12, which says: "Remember, remember that it is upon the rock of our Redeemer, who is Christ, the Son of God, that ye must build your foundation; that when the devil shall send forth his mighty winds, yea, his shafts in the whirlwind, yea, when all his hail and his mighty storm shall beat upon you, it shall have no power over you to drag you down to the gulf of misery and endless wo, because of the rock upon which ye are built, which is a sure foundation, a foundation whereon if men build they cannot fall."
I testify that if our foundation is on Christ and we do what he asks of us, we cannot fall. Even when the storms of life come down on us and we have no one to rely on, we still have Him. He is always there for us and we can trust Him. Whenever I've experienced difficult times in my life, I've found that the scriptures and prayer help me get through it. Let us prepare ourselves spiritually now, so we don't have to worry when the floods come.