There are two options when it comes to replacing drywall and tile sections in a shower. Your first option is to remove individual tiles row by row, exposing the drywall that needs to be changed. This is best for water-damaged drywall. However, for repairs that don’t have to deal with water damage to the drywall, you can simply cut through the tile and the drywall with a reciprocating saw and remove a chunk of the wall in one blow.
If you are dealing with water-damaged drywall, more is always better. If you remove tiles and have a 2-foot-wide section of water damage, remove up to 4 feet. This allows you to ensure that you get any water-damaged sections that might not be visible to the naked eye, thus protecting the surrounding wall. Always remove at least an extra 18 inches, and you can go up to 30 inches or so if you want to be on the cautious side.
When you have the option of removing an entire section of a wall, you should always include a moisture barrier behind the drywall or cement board you put back in place. This is a layer of sheet plastic tacked onto the wall studs that runs down the wall behind the drywall or underlayment, helping any additional moisture from condensation run down the sheeting to the shower pan.
Any shower tile must have a coat of waterproofing beneath it. Once you have removed the offending section of drywall and have replaced it with new drywall or a rated type of underlayment for tile, you need to cover the wall in an appropriate type of waterproofing. Paint-on waterproofing is best for patch repairs, as it doesn’t add to the thickness of the installation, but for whole-wall replacements you can use any type of waterproofing you desire, such as membranes or membrane-lined drywalls.