A rip current forms because wind and breaking waves push surface water towards the land, and this causes a slight rise in the water level along the shore. This excess water will tend to flow back to the open water via the route of least resistance. When there is a local area which is slightly deeper, or a break in an offshore sand bar or reef, this can allow water to flow offshore more easily, and this will initiate a rip current through that gap.