Similar to the kilobyte, a megabyte is a data size unit, used with relation to data storage and processing, as well as data transmission.
Just like with the relation of bytes to kilobytes, the number of 1024 kilobytes for a megabyte is a result of the binary nature of the bits and bytes (2 to the power of 10 equals 1024).
Since one megabyte has 1.024 kilobytes, we get:
1 megabyte = 1.024 x 1.024 bytes = 1.048.576 bytes = 8.388.608 bits
See the page about bytes for more detailed information.