Penalty methods are optimization techniques used to solve constrained optimization problems by transforming them into a series of unconstrained problems. They work by adding a penalty term to the objective function, which imposes a cost for violating the constraints, thereby guiding the solution towards feasibility as the penalty parameter increases.