When you have Microsoft Office Communicator or Lync installed, and you visit a SharePoint site, you will get these presence indicators next to peoples’ names

These indicators (or jelly beans as they are affectionately called) show whether the person is available, in a meeting, out of the office, on a call, etc. When you hover over them, they provide details about the person

In SharePoint 2007 (or any other web page), whenever I needed to display a presence icon in custom code, I just use the following HMTL/CSS/JavaScript:
<script type="text/javascript" src="http://sharepointsite/_layouts/1033/init.js">
</script>
<script type="text/javascript" src="http://sharepointsite/_layouts/1033/core.js">
</script>
<style type="text/css">
img.presenceIndicator
{
border-style:None;
height:12px;
width:12px;
border-width:0px;
vertical-align: middle
}
</style>
<span>
<img id="uniqueID" onload="IMNRC('jadams@example.com',
getElementById('uniqueID'))" ShowOfflinePawn="1"
src=http://sharepointsite/_layouts/images/blank.gif
class="presenceIndicator"/>
<a href="someCustomUserProfilePage.aspx?UserID=adamsjl">Adams, Jacob L.</a>
</span>