Sometimes, letters called literal numbers, are used as symbols to represent numbers. For example, when you want to say theta the cost of one book is twenty rupees.
In arithmetic - The cost of one book = Rs.20
In algebra - The cost of one book in rupees is x. Thus, x stands for a number. The use of letters help us to think in more general terms.
On comparing the language of arithmetic and the language of algebra you find that the language of algebra is
Statement: A number increased by 3 gives 8
a + 3 = 8
Statement: A number increased by itself gives 12
x + x = 12 or 2x = 12
Statement: Distance = speed × time
d = s × t
Statement: A number, when multiplied by itself and added to 5 gives 9
b × b + 5 = 9 or b2 + 5 = 9
Statement: The product of two successive natural numbers is 30
y × (y + 1) = 30
A variable is literal number which can have different values whereas a constant has a fixed value.
In algebra, usually denote constants by a, b, c and variables x, y, z. However, the context will make it clear whether a literal number has denoted a constant or a variable.