HEX is a hexadecimal #RRGGBB notation, while RGB expresses red, green and blue as 0–255 values. For example, #FF0000 is the same color as rgb(255, 0, 0). Enter any one format here and the others update in real time.
Screens (RGB) and print (CMYK) use different color gamuts, so they never match perfectly. The CMYK here is a standard formula-based approximation; real printed color depends on the print profile.