Many components will survive above the melting temperature of solder (which is kinda the point of reflow soldering). There is an old model of French car (I will not tell names, mostly because I don't remember) where the MOSFET which controls the turn indicators lives in molten solder, because the designers forgot all about thermal management. Driving fast on a speed bump causes it to fall of the board. You can resolder it (and add a heat sink this time), it'll still work.
I'm struggling to understand why for instance 1/4 resistors are safe to use in many circuits using in some cases 10 watts.
Take one 12V 12W lightbulb. It will draw 1 amp.
Put 10 of these in parallel. Each draws 1A, uses 12W, and the total is 10A and 120W. Same for your resistors, you have to check the power dissipated by each, not the total of all the stuff on the board.
I'm also curious as to how the 2n2219 is only rated for 800mW
Consider a component, there is a current I going through it, and a voltage V across it, therefore it dissipates a power P=UI.
Burning power heats stuff up.
However, the hotter it is, the better the air is at cooling it, because hot stuff heats up the air, hot air rises, which creates air flow (ie, convection).
A simple way to model this is: Temp = Ambient + Power * Rth
Rth is a thermal resistance, expressed in °C/W. If Rth is 100°C/W, then for every watt of power, the temperature will rise by 100°C. Many components will give you a "RthJA" in the datasheet, which means "thermal resistance from junction to ambient", this models heat flow from the active part of the device (usually a chip or a silicon junction, hence the J) to the outside air. If the component has a metal back (like a 7805 in TO220 package) you'll also get a RthJC (junction to case) which models the heat flow from the chip to the metal back, which you are supposed to stick on a heat sink.
Now, every component has a maximum temperature. Above that, it burns. For transistors it tends to be 150°C, for resistors a bit more. However, this isn't a binary choice. Heat makes stuff age and die faster. There is a kind of a twilight zone between "cool enough to last forever" and "hot enough to break down the day warranty expires".
As a hobby designer, it is VERY nice not to have anything that will blister your fingers, too.
Also:
Notice the resistor looks completely fine! These little bastards are tough. The PCB though, not so much. You can even tell the PCB was mounted vertically from the way the blistering hot air charred it. As to what happened to the capacitor next to it (probably rated to 85°C)...
Anyway, reversing the above formula, you get: MaxPower = (MaxTemp - Ambient) / Rth
"Ambient" can really screw you. The higher it is, the less you can burn in a given component. Inside the dashboard of a car (enclosed space) under the summer sun, it can be pretty high. Same if the air filters clog up, or the cat sits on the stereo and fills the whole thing with hair falling through the vents.
Using resistors is a bit simpler, you don't mess with thermal resistance, the manufacturer simply gives you a max power rating. However, this corresponds to the max temperature allowed for the resistor, which is usually something like 200°C. In other words, if you dissipate 1/4W in a 1/4W resistor, it will be at max allowed temperature, so don't touch it with your fingers...
So don't use 0.25W resistor for anything more than, say 0.15W. Max ratings are maximum. It's always good to derate a bit (look at the picture above again).
Now, this is engineering, so we can cheat. The rating is given with the resistor laying flat on the board, in still air. If you solder it with long legs and let it stand up in the air, there will be a lot more air flow via convection. Also it won't char your board. So in this case, your 0.25W resistor could safely burn close to 0.25W.
If your board is vertical instead of horizontal, or if there is a fan blowing on it, then you also can get close to max rating. You might even go above max rating, and burn 0.5W (It will catch fire when the fan dust filters get clogged though. That's your problem).
Basically a 2W resistor is just bigger than a 0.25W, so it is in contact with more air, so it is better cooled. That's all there is to it.
Now, say you got a good old 7805 regulator with I=0.2 amps running through it. It has 25V at the input, and 5V at the output, so V=25V across it. P=V*I, it burns 4W. Quick datasheet check reveals that in free air, 7805 regulator in TO220 package has Rth of 34 °C/W. So it is 34*P = 136°C above ambient. If the inside of your case is at 50°C then your LM317 chip runs at 186°C, which is way above maximum.
In that case you look at datasheet, RthJC=3°C/W. You put an insulating pad (add 1°C/W) and screw the 7805 on a piece of aluminium like the back of the enclosure (Rth=unknown, but let's say 5°C/W unless someone puts
a pillow on top or something).
Rth total = 3 + 1 + 5 = 9°C/W
Ambient = 40°C
Chip temperature @2W = 40 + 9*4 = 76°C
Much better! But you need a screw, and you need to think about it during layout, so your 7805 isn't in an inconvenient place.