When it is known or virtually certain that a ball is in a red penalty area and the player wishes to take relief, the player has three options, each for one penalty stroke. The player may:
1. Take stroke-and-distance relief by playing a ball from a relief area based on where the previous stroke was made.
2. Take back-on-the-line relief by dropping a ball outside the penalty area, keeping the point the ball entered the penalty area between the hole and the spot where the ball is dropped.
3. Take lateral relief (red penalty area only). The reference point for taking relief is the point the ball entered the penalty area, and a ball must be dropped in and played from the two club-length relief area, which is no nearer the hole than the point the ball entered the hazard.
Click on the link below for the rules of golf on dropping form a penalty area
Rule 17 penalty areas