Supply and demand affect prices in the market by interacting with one another. That is, the supply and demand together determine what the price will be. When supply or demand changes, the price will change as well.
The two have opposite effects on prices. The relationship between supply and prices is, all other things being equal, inverse. When supply goes up, price goes down. The relationship between demand and prices is, all other things being equal, direct. When demand goes up, prices go up.
In a free market, supply and demand interact to determine the prices of goods and services.