Rip is where there is a current taking you out and people try to swim in against it, get exhausted and drown. The solution is to swim parallel to the shore until you get to beyond the rip
But how do you know when are out of the rip, so you'd know when to stop swimming parallel?
You can feel it easily if you can touch or swim down to the bottom. Also, it's often possible to see where the sand bars and reefs that are next to the rip are located either by seeing the color of the ocean floor or by seeing the waves breaking; get behind those and you'll be out of the rip.
As surfer we call them lift. They take you out for free, and then it's easy to step out, just as on a lift. But to a swimmer who has no idea they are usually deadly.
You can focus on some constant points, like the surf or some rocks, but usually it's easy to step out, and you feel it immediately.