Visit the website of the airline with which you wish to register an account. Each airline has its own unique account registration and will only accept miles purchased and flown on one of its own planes. For instance, Delta miles will not work on a Continental account.
Enter in your personal information at the airline website enrollment page. Be sure to include the name on the account that matches the name of your personal ID used when flying. You will also need to enter your birth date, contact information and create either a pin or password that secures your account.
Once created, the airline will email you a confirmation that you must click on to complete the registration.
Purchase your airline ticket and enter the frequent flyer account number during the purchase. There is a section that allows you to link the purchased flight with your account immediately. This will automatically save and register those air miles.
Take the purchased ticket or confirmation number from an already used or bought airline ticket and log into your frequent flyer account. Search under the "Airline Mileage Credit Request Form" or something similar. Different airlines have certain restrictions on how long you have to register miles before the miles expire, but most allow at least 30 days.
If within this time frame, you can still register those miles if you did not already do it during purchase. Simply enter your account number and the ticket number.