"Lean on" is used here in the sense of relying upon or trusting someone or something for help or protection. The object of our secure trust is the Lord, a most reliable object of confidence!
When we lean against a wall or on a cane, we trust it to support us. If it should fail to do its job, we will fall to the ground and perhaps be hurt. In a figurative sense, in times of distress we lean on members of our families or friends; we rely upon them for encouragement, support, help, or protection. In this verse, "lean on" functions figuratively. Relying on our own understanding is compared to leaning on a cane that cannot bear our weight; it is unreliable for support. It is dangerous for a person to rely upon mere human wisdom or understanding because it is likely to fail him.
Acknowledging the Lord in all our ways means keeping Him in mind in every event of our lives. Godly living is not to be confined to the Sabbath, for God is involved in each moment of each day. His instruction covers our lives from waking up in the morning to going to sleep at night. He wants us to remember Him all the time and to trust and obey Him to guide our conduct in everything we do.
That "He shall direct your paths" suggests that God will "smooth" or "make straight" the road of our lives. This is a promise that God will go before us and remove many of the obstacles from our path. He wants us to be successful, so if we trust Him and follow His instructions, He will lead us forward, sweeping many of our potential problems to the side. How encouraging!
— Clyde Finklea