Variables are stored into memory as strings of bits.
The type of a variable can modify the way the variable is stored into memory: ex, the value 3 (as an integer) and 3.0 (as a float) have a different representation in memory.
Chars are represented using their ASCII values (a -> 65, b -> 66 and so on).
A char is usually 8-bits long, while an integer can be 8, 16, 32 or 634 bits.
Casting an int to a char, or a float to an int, modifies its internal representation, so that your code will be able to "use" it in the correct mode.
On 32-bit operating systems, a value represented with 32 bits is "squeezed" into an 8-bit variable: if the value of the int was less than 256, the cast just eliminates the leading zeroes of the number, else the number is truncated.