Remove the cover and access the back of the tail light assembly.
Disconnect the electrical wire. Remove three 10 mm nuts that hold the tail light in place. Now you should be able to pull the rear tail light assembley from the body of your Elantra.
Remove the brake light socket by turning it counterclockwise. You will hear the socket click. Pull the socket out.
Remove the brake light bulb from the socket by pulling it out. Be careful to not break the bulb.
Install the new brake light bulb into the socket.
Reinstall the socket into the tail light assembly. You will need to align the three tabs on the socket with the three slots in the brake light assembly. Twist the socket clockwise to lock it into the tail light assembly.
Reinstall the brake light assembly. Tighten the three 10 mm bolts. Don't overtighten them to avoid damage.
If your Hyundai Elantra brake lights don't work after replacing the light bulb, check the fuse for the brake lights.