Drupal 7.8 customising user.module
You can also use fields to add additional fields to a user or user the profile2 module. There's a good chance, that you don't even have to code a line ;-).

If you need: You can change any form in Drupal with hook_form_alter. This way you can add more functionality to the sign up form.