They know which way to go because God sends a pillar of cloud to lead them. the Lord shields them by sending the pillar behind them to block them from the pursuing army. When they get to the sea, Moses stretches out his hand, and a strong wind divides the water so they can walk across on dry land.
The people cannot see the Lord, but they can see the pillar of cloud. They can see Moses. They can see the water dividing.
William Goldingay asks: Why does the Lord use Moses, a human leader, to bring them out of Egypt? God could have done it alone but chose to use Moses. Why does God continue to use humans to accomplish significant goals? Using human beings to accomplish divine purposes introduces complication and vulnerability.
Goldingay also points out that Moses' story reminds us that leadership is not fun. People complain, question, express resentment, lose their belief that things can get better. (Old Testament Theology, Volume One, Israel's Gospel, 425-430)
The Israelites, on foot, were able to walk across the river bed. But, the wheels of the army's chariots were mired in the mud. Sometimes, what we thought was protection turns out to be hindrance.
Moses stretches out his hand again, and the sea returns to its normal depth. Pharaoh's entire army is destroyed.
When the Israelites saw that they themselves were alive and safe and that the Egyptians were dead, they feared the Lord and believed in the Lord and the Lord's servant Moses.
The notes in the New Interpreters Bible point out that there's a play on words in verse 31. The Hebrew word that we translate as "see" (ra'ah) sounds like the word for "fear" (yare').
As we read ahead in the story of the trek through the wilderness, we'll hear how when they saw something else--like their thirst or hunger--they would lose their trust in Moses and in the Lord's protection, and they will complain. If seeing is believing, what happens when we see something else?