let me explain...
you have a database, 3 fields as follows
ID
User
Active
you then send an email out with the id number that relates to that user.
1,neil,0
2,peter,0
so you send a link yoursite.com/confirm.php?id=1
when this link is clicked it then uses a query on your database based on the ID=1, you then update the database field 'active' to =1 instead of 0
this would then make the user 'neil' an active user.