End user sign in and/or registration template example
Here is an example of how to do a login form for users with existing accounts: http://buildwithcraft.com/docs/templating/login-form

You can see more form examples in the left hand menu of that page.