Let's start by saying avoid collisions at all cost!
Moving on from that important message ... when wind powered craft share the water there are just three rules:
1. When on the same tack, the windward (upwind) craft keeps clear of the leeward (downwind) craft.
2. When on opposite tacks, the port* tack craft keeps clear.
3. When overtaking, the overtaking craft keeps clear.
* You are on port tack on a windsurf/wingsurf/foil board if your left hand is nearest the mast/nose of the board (ignoring switch stance) and the wind is from your left/port side
Another way to remember it is, when approaching head-on, the person with right of way has their right hand forward (ignoring switch stance) and the wind is on their right/starboard side.
The right of way sailor maintains their course and the give way sailor makes an obvious early course alteration. Please also exercise extra caution when approaching someone slower/less experienced.
A sail/wing powered craft technically has right of way over boats with engines, but caution has to be exercised!
When sail/wing powered craft share the water with paddlers all should stay well clear of each other and generally observe the rules above. If approaching head on, both should turn to starboard (right) early on to avoid a collision. The paddler has right of way when being overtaken, so others should give him/her a wide berth.