Unlike approaching from the rear or the side, when two power-driven boats approach each other head-on, there is no clear give-way or stand-on rule. That means extra communication is needed between the two vessels.
The usual procedure in a head-on meeting is for each vessel to give one short blast and then pass port-to-port. To pass port-to-port, give one short blast and, on hearing one short blast from the other vessel, veer to starboard so that you pass the other vessel on your port side.
If it is not possible to pass port-to-port due to an obstruction or a nearby shoreline, you can pass starboard-to-starboard by signalling two short blasts. The other vessel will return two short blasts, and you can then pass by veering in the port direction.
Communication is key, so review your sound signals!