it isnt to difficult.
basically the first thing you need is a form for the user to write the message and select the user.
have a combo box and populate it with the user names of the people and thier ID from your database. also, if you want them to be able to click a name elsewhere on the board and come to this page, have the links include the user ID they clicked on
eg: <a href="sendmessage.php?send_to=13">Send a message to Jack</a>
in sendmessage.php have this (or similar code) to make the combo:
<select name="send_to">
<?php
$result = mysql_query("SELECT * FROM members",$db);
while($members = mysql_fetch_array($result)) {
$selected = "";
if ($members["id"] == $send_to)
$selected = " selected";
echo "<option value='".$members["id"]."'$selected>".$members["user_name"]."</option>";
}
?>
</select>
You will also need a textbox for the message to be put in.
Once the form is submitted, store it in a new database table (called messages i suppose) with 6 fields: message_id, to_id, from_id, date_time_sent, message, read (default 0).
Then just have a page that will display all messages, ordered by date_time, with the to_id of the person viewing that page.
When they view the message, update the read value to 1 - that way you can show how many unread messages.
Also have delete and reply features also.
Obviously there is more to it then that - but that is the basics.