During Buddy Breathing two divers breathe alternately from a regulator. As a rule, these are your diving buddy and you, when your regulator fails or someone runs out of air. You bridge the time until resurfacing by breathing from the functioning regulator. In doing so you should carry out the buddy breathing strictly according to regulations, so that each of you gets enough air.
When your regulator does not function anymore, you should give your diving buddy a signal right away. Then you proceed as follows:
Take hold of each other’s jacket, so that you do not drift away from one another.
If the mask and the regulator are separated, then hand each other the functioning regulator. Thereby, each one inhales and exhales three or four times and passes it on to the partner afterwards.
Do not forget: Never hold your breath! During the time that it is not your turn to breathe, you make little air bubbles, in order to let the air slowly out of your lungs and thus avoid a barotrauma.
You repeat this procedure until you have reached the surface. If the regulator is only iced you can possibly breathe with yours again after a few minutes.
Generally true: Avoid panicking! And end the dive as quickly as possible at any rate.
All of this is an utterly unlikely extreme situation, which you will practise in your diving course. In a normal situation, your buddy and you still have an alternative air supply (the so-called octopus) with you, which is carried along with your equipment extra for such cases on every dive.
Find the best Dive Professionals, Dive Centers and Liveaboards on rateyourdive.com