Typically, you'd submit your data to a PHP file using a form. For example:
<form method="post" action="email.php">
<input name="email" type="text" />
<input type="submit" />
</form>
Your mail.php would look something like this:
<?php
$to = $_REQUST['email'];
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>