When using linear models such as the supply-demand model in economics, both P and Q are endogenous (内生变量; their values are decided in the model). Other variables that are introduced in the supply-demand model are termed exogenous (外生变量; their values are decided outside of the model). However, whether the variables are endogenous or exogenous depends on the model builders (you and me).
Q = a + b*P + e*I (Demand), b < 0 and e > 0 (if the good is a normal good)
Q = c + d*P (Supply), d > 0
Example:
内生变量: P and Q
外生变量: I (income)
常量: a, b, c, d, and e