When you create any list or Library a column named ID is created automatically and it is  Auto-number Column..

and if you want to create your own autonumber column you can create it with Calculated Type of Column..

http://www.go4sharepoint.com/Forum/autonumber-field-list-2963.aspx