Watch any pro race on TV. Observe when on a REALLY steep climb, requiring an out of the saddle effort, the technique. What is happening is two fold, the arms are pushing the bike up against the drive side leg, so there is longer on the down stroke. PLUS, if you watch carefully, you'll notice that on the upstroke there is pulling going on, which smooths out the climb speed, and HURTS!
The whole process does take much more energy, however, than simply sitting in the saddle and pedalling, holding the bars on tops or hoods, steadily pulling back on them, using a lower gear, and still getting some pressure on the upstroke at the same time. Hard but more efficient. Depends how hard you want to go, a pro would generally want to spend as much time in the sadle as possible to retain energy and go a bit easier. Only out of saddle for big efforts when needed (attacks, mountain sprints at the summit, uphill finishes, etc).