What is the difference between discrete and continuous variables?

Discrete variables take distinct values (e.g., whole numbers), and you get them by counting (e.g., The number of cars that pass a certain point).

Continuous variables take values that can be infinitely subdivided (e.g., decimal numbers), and you get them by measuring (e.g., the weight of a loaded car).

Discrete and continuous variables are both quantitative variables.