Getting frozen posts, stems and the like out of a frame/fork can be quite a chore. Liberal lubing of parts (grease, anti-sieze, carb prep) is a must. If a part- say a seatpost- isn’t getting tight when tightened, something else is likely wrong. A crimped clamp, wrong size post or belled steering column are typical. Removing lube from the part however, will likely only lead to it corroding and making it hard to impossible to remove.
Sometimes parts are less frozen than first presumed so be sure to first try moving with a properly clamped saddle. When this fails a penetrant, heat and brute force may be the only answers. Hammering straight down- provided the post has room to move and is not hitting a water bottle boss etc- or clamping the reinforced section in a vise can also prove successful. Reposition the pipe jaws to your advantage if possible. Using a large punch which fits the inner diameter of the post can help clamp it and keep it from tearing prematurely. The pins holding the seat clamp in a one piece post will quickly break so be sure to clamp the section just below where the insert provides reinforcement. Quick back and forth twisting with penetrant and/or heat from a heat gun is usually preferred to greater more direct force as it allows penetrant to seep in if possible without bending or breaking things. Be sure to have excellent ventilation if you do end up heating penetrant as this is especially toxic. If you get it to move just once you’re in business. If the extended post is short or breaks off, drilling into the existing section and anchoring a chain with a bolt, punch etc can help pull it out if it is already moving. If all else fails drilling out the center of the post with a large bit/extension (to thin the walls) and cutting down the length of the inside wall of the post and folding it in on itself should work. Be careful not to cut into the tube. You will then need to carefully drive a sharpened wedge or expendible screwdriver to move in the pieces by the cuts. But weigh this against the value of the frame. This is hard work and only done as a last resort. Some parts such as aluminum seatposts can prove extremely difficult to remove.
Lastly, if you can find a new, larger straight gauge seat post with an inner diameter fitting the outside of the stuck one you can make a seat mast by cutting and slotting and putting a clamp around it. Be sure to insert as much as possible (at least as much as the min insert- but try to cut off just what you won’t need for correct rider height) and reinstall the bolt on the frame clamp- in case it does work free some day.
Stems can be equally difficult. Make sure the wedge is free (tap away from stem however possible) and try clamping the crown area between some wood in a vise. Tight enough to hold but don’t crush tubes/ crown. This just needs to keep the steerer from moving while you try to work free the stem- ideally with a different handlebar if possible. Applying penetrant from top after first removing the headset locknut if this improves access.
Frozen pedals can be a chore to get off. Use a good condition long handle pedal wrench with leverage/ heat if need be. If the pedal wrench can be leveraged against the floor or fit into a vise it may come just come out. If the threads do strip (are pulled out with the pedal) a nice helicoil kit can often save the crank. Use the spring type helicoil for best results.