Each country has its own laws and regulations which govern how you may interact with orca in the wild. In many countries and states, it is illegal to approach too closely to orca, either by boat and other watercraft or when swimming. If you do come across orca, many laws stipulate that you must keep outside of an exclusion zone (for example, in US waters you are not allowed to approach closer than 200 metres). This also applies for if you are swimming in the water and where able to do so, you must get out.
It is incredibly important that you research these laws for any given country or state because they will differ depending on where you are. By not being aware of regulations, you could put yourself and the orca into a dangerous situation and you will also be liable to receive any penalties set out by the country or state, (such as a hefty fine and/or jail sentence). In many countries, to be able to swim with orca you must have a special permit provided by the government.
Orca are top ocean predators and the largest apex predator to roam the earth since the dinosaurs and so they should be treated respectfully.