When we speak of non-price factors that affect demand, we mean factors other than the price of the good whose demand curve we are considering. So, another non-price factor that affects demand is the price of related goods. By related goods we mean goods that are related in consumption, and by this we mean goods that can be considered substitutes for one another, or complements to one another.
Substitutes are exactly what the name implies. They are goods that a consumer considers similar, that have similar characteristics and provide similar satisfaction. If two good are substitutes for a particular consumer, she will be willing to substitute one for the other depending on price. Individual preferences play a role in determining which goods are substitutes. For some consumers butter and margarine are close substitutes. Other consumers might never use butter under any circumstances, and yet others might never use margarine, for these consumers butter and margarine are not substitutes. When considering a large market however, such as the U.S. economy, we can say that at this level, butter and margarine are substitutes because even though there may be some consumers who don't consider them to be substitutes, there are many who do.
If two goods are substitutes for one another, it does not mean that the consumer is indifferent between them. Consumers will usually prefer one to the other, often strongly, but will still be willing to substitute the less preferred item under the right circumstances. When the price of a substitute falls, typical consumers will purchase more of the, now cheaper, substitute. When the price of a substitute rises, consumers will purchase less of the, now higher-priced, substitute. In other words, a change in the price of a substitute leads to a shift in the demand curve for the original good.