Turn off the water supply to the shower before you begin to make any repairs. There should be an access panel to get to the shutoff valve somewhere in the bathroom. It may even be located on the opposite side of the wall.
Grip the shower arm firmly with pliers or vise grips. At the same time, tighten a wrench around the nut on the shower head, and loosen by turning it counterclockwise. Unscrew the shower head the rest of the way with your hand and remove it from the arm.
Soak a cloth in white vinegar and wrap it around the nut on the shower head if it won't come loose. Sometimes mineral deposits make it difficult to remove the shower head from the arm, and the vinegar helps dissolve the deposits.
Continue gripping the shower arm with pliers and turn it counterclockwise to remove it from the wall. You can also use a 16-inch pipe wrench to unscrew the shower arm. If you can't get it unscrewed, spray with a lubricating oil such as WD-40 and let it sit for about 2 hours before trying it again.
Replace the shower arm with a standard 1/2-inch shower arm designed with male threads on each end. These are available at most hardware stores.
Wrap about five layers of Teflon plumber's tape in a clockwise direction around the male threaded end of the shower arm to be secured to the pipe in the wall. Pull the tape tightly to prevent leaks. You can also use a pipe compound instead of the plumber's tape.
Screw the end of the shower arm directly onto the elbow of the pipe inside the shower wall by turning it clockwise. It should take about two turns.
Wrap several layers of Teflon tape around the threads on the opposite end of the shower arm before screwing the shower head back on. Turn the shower head clockwise about one half turn with a wrench. If it leaks, turn it another time or two to tighten.