Well assuming that you have the HTML form requesting all of the info required... let's begin!
$sql = 'SELECT email, password FROM users WHERE username=\''. mysql_escape_string( $_POST['$username'] ) .'\''
$result = mysql_query( $sql );
if( mysql_errno() == 0 && mysql_num_rows( $result ) == 1 ){
$dbRow = mysql_fetch_row( $result );
mail( $dbRow[0], 'Lost Password', 'Here is your password:'.$dbRow[1],'' );
}else{
echo 'Error has occurred!';
}
This is very rough with little error checking and ugly output but use it as a basis for your final product.