Here is a pretty thorough article.
In short, gigabytes are base 10, and so a gigabyte is 1,000,000,000 bytes.
Computers handle binary numbers better, so they use base 2. A gibibyte is a close equivalent to a gigabytes but is actually equal to 1,073,741,824 bytes.
Computer hard drive manufacturers measure their drives in gigabytes (base 10). Computers measure their drives in gibibytes, but mistakenly call them gigabytes, and it results in an apparently smaller number. (This partly because the term "gibibyte" didn't even really exist until fairly recently.)