RGB is the colour system that screens use, built from red, green and blue light. By mixing those three at different strengths, a display can produce millions of colours. All three at full strength make white, all three off makes black.
Think of three coloured stage lights pointed at the same spot. Turn up the red and dim the others and the spot glows red. Bring up green and blue too and the colours blend toward white. Every pixel on your phone or monitor works exactly like that, just at a microscopic scale. This is why RGB is sometimes called an additive system: you add light to reach brighter colours, the opposite of mixing paint. It sits alongside CMYK, the ink-based system used for print, as one of the main color models designers work with.
Each of the three channels usually runs from 0 to 255, which gives 256 levels per colour and roughly 16.7 million combinations in total. So pure red is written 255, 0, 0, and a soft grey is the same value in all three slots. That 0 to 255 range is exactly what a hex code packs into six characters, two per channel.
In practice you rarely set RGB values by hand. Most web colours are written as a hex code, which is just a shorthand for the same red, green and blue amounts. The brand cyan on this site, for instance, is one specific RGB mix. The catch is that the same numbers can look slightly different on two screens, because a cheap panel and a calibrated monitor render light differently, which is why print proofs still matter.
At TopDevs we keep RGB and print colours aligned for every client, so your brand looks the same on a website, a phone and a printed flyer.