What is the common error message "Cannot modify header information - headers already sent by" in PHP and how does it typically occur?

The common error message "Cannot modify header information - headers already sent by" in PHP occurs when there is whitespace or any other output sent before the `header()` function is called. To solve this issue, make sure that there is no output (including whitespace) before calling the `header()` function.

<?php
ob_start(); // Start output buffering

// Your PHP code here

ob_end_flush(); // Flush output buffer