The biggest component of your GPA is, of course, your grades. Most GPAs are calculated on the 4.0 scale, in which a 4.0 is roughly equivalent to an "A" average, a 3.0 is analogous to a "B" average, and so on. Better grades will always mean a better GPA. This information makes it possible to project your GPA in the future.
Some classes are weighted more heavily than others, making the grades you obtain in them worth more. In high schools, AP courses are often worth more than traditional classes. For collegiate classes, weights are often determined by the number of credit hours assigned to a class. For example, your grade in a class worth eight credit hours will be more than a class worth four credit hours.
The number of classes you've taken is also significant. The more classes you take, the harder it is for any single class to greatly influence your GPA. At its most basic, your GPA is the calculation of the sum of your grades divided by the number of classes you have taken.
In college, you may have more than one GPA. In many cases, the GPA for your core classes -- those pertaining to your major -- is calculated using only those classes that count directly toward your major, without the addition of grades earned in other areas of study. Likewise, you will have different semester, annual and overall GPAs.