there are basically three different methods being discussed here:
1. seated spinning
2. standing, what i'll call "dancing on the pedals" spinning
3. standing to attack/put in a really big effort
look at all the best climbers out there, they sit and spin on long efforts and stand and "dance on the pedals" to break up the seated spinning position on longer climbs or even just to get off the saddle and refresh their "sensitive areas" periodically on really long climbs.
When attacking or on shorter steeper pitches, more upper body is brought into the mix to gain more power/speed.
There is a huge difference between attacking whilst standing/putting in a really big effort and "dancing on the pedals" for going roughly the same speed as if you were to sit and spin.
When attacking, you use a huge amount of upper body to saw the bars side to side opposing each leg extension. this is basically the same as sprinting just going up an incline. note that if your just starting out riding, you may have to resort to this to just get up things, not necessarily to "attack"
When "dancing on the pedals" I find I am usually just a gear or two harder than my seated spinning gear, or sometimes even the same gear. My arms are resting on the bars, but have hardly any weight whatsoever on them. You will hear old-timers refer to "having fingertips in the bartops like your playing a piano" to keep yourself as efficient as possible, this whole technique should basically feel like relaxed from the abs up through your shoulders and out your arms, not in tension whatsoever. Just stand up like your climbing stairs, just as smoothly as possible. focus up spinning smooth strokes, not blocking stairmaster moves. Your using a lot of your bodyweight to turn the pedals over but need a decent technique to keep it efficient and smooth. At high cadence, it almost feels like running up the hill with a relaxed upperbody.
Seated spinning takes a lot of practice to feel right, and I have found that most beginning riders hate it because they lack sufficient fitness to turn high rpm without raising their heartrate and oxygen consumption through the roof. The more you sit and spin, the more it will feel natural, but it could take a year or two!