When a lightning bolt strikes the ocean it hits the water and then spreads out over the water of the ocean.
The water in the ocean acts as a conductor so the lightning bolt travels freely through the water.
Lightning bolts can also electrocute and kill fish in the water if there's fish nearer the surface of the ocean when the lightning hits.
The lightning can also strike boats and even people in the water so if you're out in ocean or other water source and it's beginning to storm and lightning then you should get out of the water right away.