A variable is a symbol that represents some sort of information. The name “variable” indicates that the information represented by that variable is not a fixed value. For example, researchers might use the variables age, gross income, and level of education in a survey when collecting and analyzing data, and the value of those variables will differ based on the research subject and, if for example it is a longitudinal survey, when the data is collected. In research projects, the meanings and purposes behind variables are defined and described in a data dictionary.
The term “variable” is also used in mathematics and computer programming in similar ways. In math, a variable is a symbol (often just a single letter like “x”) that stands in for an unknown numerical value in an equation. In computer programming, variables are symbols that are assigned information, though the information they can be assigned is not limited to numbers—the variables in programs can be words, numbers, computations, algorithms or other things.
The Australian Bureau of Statistics provides a good breakdown of what variables and how they are categorized: https://www.abs.gov.au/websitedbs/D3310114.nsf/home/statistical+language+-+what+are+variables
This video from Khan Academy explains variables with the example of wages and tips: https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:foundation-algebra/x2f8bb11595b61c86:intro-variables/v/what-is-a-variable