Is it a drain pipe or a pressure pipe? The degree of attack depends on whether it needs to seal against water pressure, or if it's just a drain.
If it is a pressure pipe, then you will need to avoid damaging the threads. Not necessarily a different process but more care.
You need to slot the inside of the male fitting with a saw or a Dremel tool or some other device. If it is a small pipe (perhaps up to 1 1/2") you can put two slots in it and put a piece of flat metal across it and try to turn it out.
If the size is such that you can cement in a piece of PVC as an extension you might be able to turn it out. For example, if you took a male adapter of the next size smaller, sand the threads down so it is a snug fit, cement it in, leave it for 24 hours, and then try to turn it out with a pipe wrench. If the cement holds, you are done. If it doesn't hold you are back where you started.
If neither of the above seem to be workable, then cut at least 3 fairly wide slots, just down to touch the female threads, and try to break it out by working from the outside in with a cold chisel or heavy screwdriver. This will probably work best if it is a large pipe. If you have a heat gun, or even a torch carefully applied, it will be easier if you soften up the male piece.