The best way for a beginner to get credit is to apply for a credit card meant for a beginner. If you already have a checking or savings account, check to see if your bank has a credit card for someone with limited credit history. If you can't get a credit card at your current bank, there are still more options.
Getting a department store credit card or an oil company credit card is easier than a major credit card, like Visa or Master card. While these cards are easier to get, they also have higher costs. For example, the interest rate, which is essentially the cost of carrying a credit card balance from month to month, is higher on department store and oil company credit cards. On the bright side, having a positive history with one of these cards helps you qualify for a major credit card later on. If you pay your balance in full each month (which you should) you won't have any finance charges.
You can also apply for a secure credit card. This is a type of credit card, that requires you to make a deposit to receive a credit limit on your credit card. Some secured credit cards will convert to non-secured cards after a certain period of positive credit history.

