It is great to assemble nuts and bolts with lubricant so that years later, they can still be unfastened. However, if you have not had that advantage, and are faced with a stuck fastener now, here are some techniques that may help:
Tap lightly but repeatedly on the head of the bolt or screw. This will break the bonds of corrosion that hold the threads together.
Use heat. Heat causes metal to expand, so if you heat the nut more than the bolt, it will be larger. The hole in its middle will expand also, and so it will be looser on the bolt. Heating also causes movement between the nut and bolt, so that the adhesions will be broken. If the nut or bolt won’t turn when heated, try again once it cools.
Drill their heads off. In the case of Phillips head screws, you can sometimes drill the heads off, and then remove the remaining studs with a pair of Vise-grip pliers.
Tap sideways. Another technique that often works with screws is to drive against the head of the screw with a chisel at a counter-clockwise angle. This will create a slot in the side of the screw head, and you’ll be able to tap against the slot with remarkable turning force. Sometimes you can even reuse screws that have been removed this way.