In business, there will almost certainly be cases where you have an employee who is underperforming or acting inappropriately. Issuing written warnings is a mandatory part of the performance management process; either driving performance corrections or supporting the decision to terminate.
A warning needs to communicate the performance deficit of the employee, reiterate the expectations of the organisation and communicate the consequences if improvement is not achieved.