Rust, dirt, coats of paint applied carelessly, or simply the passage of time can cause a screw to remain firmly stuck in its place and make it seem as if there is no way to remove it. What then?
You can try using one of the typical lubricant products found in hardware stores or DIY centers. They are usually sold to be used with screws in metal, but you can apply it to screws fixed into wood as well. Apply the lubricant and leave it for a few hours, days even, if necessary.
Then use the adequate screwdriver to remove it. Maybe the screw has loosened enough to come out easily, but you will probably need to apply some strength. To avoid possible damage to the screw head, while trying to rotate it apply pressure towards the bottom with a screwdriver.
If nevertheless you damage the screw head anyway, to the point where you can no longer turn the screwdriver, you still have several options.
The first is to use a Dremel-type multi-tool and cut the screw head with one of its saws. If what you want is to separate two pieces, that can suffice. Otherwise, leave the buried part in its place after removing the screw head, and try to conceal it as best as possible with putty, wood pulp, or a similar product.
If the screw is in wood, you can use a wood chisel, or even a flat screwdriver to remove small portions around the screw so that you can grip and remove it with pliers. You will damage the wood and will then have to hide the hole with wood pulp, but you will remove the screw. If you must put a new screw in afterwards it is better to screw it somewhere else because the old hole will be weakened and enlarged.