Let's chill ON the beach.
OR I am staying in a house BY (or BESIDE) the beach.
Let's swim in the OCEAN.
The ocean is the sea water that washes onto the beach.
A beach is a relatively flat piece of land next to the water in an ocean, lake or river. It contains sand, rocks, shells and debris that washes up on the shore. If the edge of the ocean, lake or river are high cliffs or dense overgrowth then there is no beach.
Since the beach is NEXT TO the water you cannot swim IN or ON the beach because it contains no water.
You swim in the water, the ocean, the lake, the pool, the pond, the dam, the river, or the stream. You usually get into the water by walking on a beach to get to the water's edge. If there is no beach then you would have to jump off rocks or cliffs or out of a boat or swing on a rope tied to a tree that is growing on the banks of the water. A beach is generally covered in sand, shells, pebbles, small or medium sized rocks and sometimes hard mud (if the beach is next to a river or a lake or a dam.)