There are lots of reasons for and situations whereby you need to know how to remove a nail from wood apart from during demolition work.
Sometimes it is large nails that are stuck and difficult to get out that want removing, maybe you bent a nail while hammering it in. Other times it can be small nails with tiny heads too small to grip with your hammer that are difficult to remove.
When you can't just remove the timber, bang the nail back through from the other side and then pull it as normal with the claw of your hammer, the following tips should help get you out of the sh#t..
This might sound stupid but before you go through the hassle of actually wrenching the nail out, does it definitely need removing? For example, if the nail bent whilst trying to drive it home, and you are working on structural/first fix carpentry that won't be seen, or is going to be ripped out later anyway (a temporary brace for example). Can you just bend the nail over, forget about it and move on?
Or perhaps you are working on some quite thin timber, and the nail is a pin that doesn't have much of a head on it. Because the timber is thin and the head won't do any damage, punching the head right through the material will solve the problem and release the timber again. Then, simply adjust the work piece and re-nail in a different place.
The first method to try and remove a nail in this instance because it requires no extra tools would be to wedge the claw into the body of the nail, tight against the timber and lever/twist the head from left to right instead of the normal straight forward method, to pull the nail out.
It might take a couple of attempts, first turning to the left then re-gripping the nail lower down and twisting to the right, back and forth but it should come eventually. The head of your hammer will dig into the timber though unless you put a piece of scrap in between - important if the work piece will be visible/seen afterwards.
If the nail is stuck fast and you can't get enough leverage with the claw of your hammer, then to remove a large nail (framing nails like 100mm wire nails for eg.) you will need more leverage
Firstly, try putting a scrap piece of wood between the claw and timber. This will increase the leverage immediately making it easier to remove the nail and also will protect the timber underneath/stop the claw of your hammer damaging the work piece.
If that doesn't do it, grab your Crow Bar, and use that with the scrap piece of timber in between to lever the nail out.
To remove a large framing or wire nail when the head has been buried you'll want something like a cats paw or similar. There are a few tools like my Dewalt claw bar that are pretty much the same and do much the same job. It's not one of those hand tools you use every single day but a cheap one that when you do, you are really grateful for. Either during demolition work, when a customer has you build something and then changes their mind or when you go to nail something and just as you pull the trigger on the nail-gun the timber bloody moves!! It gets me out of trouble..
All you need to do to use it is beat the claw in and under the nails head to get hold of it before levering it out. Pull it either all the way or just enough to get the claw of your hammer under. At this stage you may need to use the timber in between like previously mentioned for extra leverage.
Generally the easiest way with this method and whenever possible is to go in the same direction as the grain - not across/against it
To remove a nail that is really small, perhaps too small to get the claw of your hammer underneath then you can use a combination of things.
Large headed nails: to remove small nails with a large head, try the cable cutting part of your pliers. Because it is very thin it is easy to get under the head of a nail, then simply lever upward to pull the nail out.
Small headed nails if that doesn't work, try a set of Pincers like in the two pictures below.
If the nail is a slippery little bastard and you simply can't get hold of it, try a set of Mole grips / self grip pliers.
Simply adjust the size of the grip to the right size and lock them on. Again in this instance use a piece of scrap timber underneath to prevent the grips digging into and damaging the face of the timber.