Just for clarification - this is referred to as a doctype or declaration. "Headers" refer to data that is sent by browsers to the server to request a file, or sent at the head of the file returned by the server, kept invisible to the user, to facilitate the communication.
Basically, as webmasters move from the older HTML standard to the newer XHTML standard, they add this tag to tell the web browser what type of document the web page is. The url points to a DTD, which is basically a file that tells the browser how to display the web page.
There are two major variations of this tag:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
The transitional version means that the document is similar to the old HTML format that everyone is used to. The strict version is newer, and literally more strict and closer to XML. For example, frames are not allowed, and a lot of tags are deprecated. Some tags have also been changed. For example <IMG src="file.jpg"> is probably acceptable in a transitional document, but in a strict document, you have to use <img src="file.jpg" />. The tag has to be closed, you have to have quotes, and the tag name has to be lowercase.
Basically, the strict tag is to be used when your site is fully compliant with the XHTML standard. The transitional tag is intended to be used as you migrate your web site from HTML to XHTML. You get the benefits of being able to use newer XHTML functionality, but some backwards compatibility is maintained for older sections of code. Your site should be marked transitional until you reach your final goal of full standards compliance and can label it strict.
A better explanation:
A List Apart: Articles: Fix Your Site With the Right DOCTYPE!