A variable is a symbol of an event, act, trait, characteristic or attributes that can be measured and to which we assign categorical values.
For the purpose of data entry and analysis, we assign numerical value to a variable based on variable’s properties. For example, some variables, said to be dichotomous, have only two values (Male-female; Employed-unemployed), generally 0 and 1.
A discrete variable is one that can take on a countable number of different values. E.g. The number of people attending a seminar is a discrete variable because we can count the number of people (E.g. 10, 11, 12, 13 people) in the seminar. There is no such thing as fractional (E.g. 10.2 or 12.5 people) . A categorical variable (E.g. religion, race) is also a discrete variable since only certain values are possible.
A continuous variable is one that take on infinite number of different values. E.g. The distance between two places is a continuous variable because the distance could be 5, 5.8 or 5.83445 meters.