How do I remove this fitting on water heater T&P relief valve?
You will need to cut the PVC pipe. Because of the shape of the elbow you will likely need to make a cut just below the male adapter where it screws into the relief valve, and another on the horizontal pipe, to facilitate removal. Make sure your cut on the horizontal leaves room for gluing a fitting to the downstream side.

It might be a good idea to investigate whether or not it is feasible to cut the horizontal farther downstream on the other side of the wall, as it appears this is the second repair on the line and you will soon run out of room for future repair.

To make future repair easier you might be able to use an elbow union, you will need to assess if there is sufficient vertical distance. Also, union elbows are not very common; you may need to visit a specialty plumbing shop or order one special.