First, note that in the real world nearly everything moves the curve. Moving along the curve is just a math artefact to explain that we deal with function:
q = f(p).
Of course, with axes confusingly exchanged their default mathematical seats.
So, when you study a demand function in isolation (in other words, local closed model) you may only consider price,
p, as exogenous variable and its change causes change in quantity,
q. That is all. Function itself is just given and unchanged. In that abstract model you can never know WHY prices have changed because you have no information about anything outside the primitive system.
In its simplest form we may consider:
q = A – B * p,
B – just positive constants. (In a sense they are also exogenous but the model prohibits them to change: they are parameters – not variables.)
Second. If you treat your local market as a part of outer system, you may include the influence of the other factors (markets etc.) that are not included in you model explicitly. That is when
A (and, perhaps,
B) comes into play, and this play is crucial. Parameter
A stands for everything else in the world. So the change of a relevant exogenous factor (i.e. consumer’s income,
I) will cause change in value of
A. That is what makes your curve shifting – up or down (but we confusingly teach our first-year students that it shifts right or left, which is just visual effect of axes confusion).
To get a sense of it, think of your initial model as follows:
q = A – B * p = (C + D * x) – B * p,
x can be anything that may practically influence your local market (if income,
x = I).
A can be seen as a function of
x, and there is nothing wrong to think of x (and D respectively) as a vector:
A = C + D * x.
You should now see that your simple initial model is just a projection of multifactor model:
q = C + D * x – B * p.
To sum up, there are 99.9% cases in the real world are shifts of demand (or supply) curves (the rest is for Economic textbook tests and quizzes).