In PHP, using constructs such as [man]echo[/man] and [man]print[/man], data is immediately sent across the connection to the browser.
Some functions (i.e. [man]header/man, [man]setcookie/man, [man]session_start/man, etc.) require that no output be sent before calling them. Why? Because once you output data, HTTP headers are already sent to the browser and these special functions can't add the necessary fields to the headers.
Using [man]ob_start/man, you can stop PHP from automatically sending data. It will instead load outputted data into memory - a buffer. That way, scripts like this will work just fine:
<?PHP
ob_start();
echo "This is some outputted text. Normally, this script would fail, but since I'm using output buffering it will work just fine.";
setcookie('aCookie', 'aValue');
ob_end_flush();
?>
Note that you use [man]ob_end_flush/man when you want to send all of the buffered data. [man]ob_end_clean[/b] simply discards the buffered data, never sending it to the browser.