Once you have validated the form and stored the results you would call mail()
Assuming your have already taken the users $_POST variable, validated it and stored it as $email further up the script then ….
$to = $email;
$subject = 'Form submission at www.yoursite.com';
$message = 'This is an auto generated response from www.yoursite.comrnrnThank you for your submission.rn';
$headers = 'From: firstname.lastname@example.org' . "rn" .