A gigabyte is a collection of about 1 billion bytes, which is around 1,000 megabytes.
In the metric system, giga is a prefix for 1 billion, or 109. So in some cases, a gigabyte is defined as 1 billion, or 1,000,000,000 bytes. Storage media companies usually use this definition of gigabyte when selling hard disks, SSDs, and flash drives.
But because computers work in binary, computer scientists usually define a gigabyte as 1,073,741,824 (10243 or 230) bytes. This works out to 1,024 megabytes. For programmers, the term "mega" rose out of convenience, as 1,073,741,824 bytes is close to 1 billion.
Computer systems usually report storage usage with the binary definition of gigabyte. For example, if you have 3 gigabytes of photos, that translates to 3,221,225,472 bytes.
The abbreviation for gigabyte is gB in the metric system (1,000,000,000 bytes), or GB in the binary system (1,073,741,824 bytes).
Some groups have proposed the name gibibyte for a unit of 1,073,741,824 bytes to prevent confusion. The abbreviation for gibibyte is GiB.