One light switch can show two things: off or on. Two switches give four patterns: off-off, off-on, on-off, on-on. Each extra switch doubles the count, because every old pattern now appears once with the new switch off and once with it on. So 3 bits give 8 patterns, 4 bits give 16, and n bits give 2n. Adding one bit does not add one value; it doubles them, so 9 bits give 512 where 8 bits gave 256.
A byte is a group of 8 bits, so it has 28=256 patterns. Read as numbers they run from 0 (00000000) to 255 (11111111), which is why one RGB color channel goes from 0 to 255 and why the letter 'A' fits in one byte as the number 65. Bigger amounts use prefixes: a kilobyte is about a thousand bytes, a megabyte about a million, a gigabyte about a billion. Strictly, the binary versions are 1,024 bytes, 1,048,576 bytes and so on, written KiB and MiB. Computers often report the binary version while drive makers advertise the decimal one, which is why a '500 GB' drive shows up as about 466 GB.
Two look-alike questions need different answers. The binary number 11111111 is worth 255; the number of values 8 bits can hold is 256. One reads a single pattern, the other counts all of them. Watch the capital letter too: lowercase b means bits and uppercase B means bytes, so 8 Mb and 1 MB are the same amount of data.
Think of it like this. Bits behave like coin flips in a row: one flip has 2 outcomes, two flips have 4, ten flips have 1,024, because each new flip doubles every list of results so far. A byte is a row of 8 flips, 256 possible rows. The comparison stops at chance: a computer sets each bit on purpose.
Core idea. All digital data—text, images, music—is ultimately stored as sequences of bits grouped into bytes.