You know how to send an email?
Then all you have to do is put a link somewhere in the email to a script.
Say:
www.yourdomain.com/emailvalidate.php?userid=bob&.....
Then change the value or whatever in your database (MYSQL?) to validated=1
quite simple, But then i could be wrong...