First and most important, remember that most prices are not secretly controlled by some evil CEOs in a secret back office somewhere. Prices are determined when both a buyer and seller agree on a price, and if you don't like the price, you can always walk away.
Think of an auction: The auction master brings up an item, and people bid on it. Usually, the price at an auction is determined by three things: the minimum bid allowed at the auction, the maximum amount of money that people can pay, and finally, how much the bidders actually want the item being bid on. Also, think about negotiating: you want to buy something from someone else, they suggest a price, and you either pay, ask for a different price, or refuse buying. Even though we don't auction off stuff at Wal-Mart or try to haggle the price of a Coke at a convenience store, these two things are in fact happening, and you are doing this every time you buy something, without even knowing it!
Let's look at a gas station selling Coca-Cola for example. If you buy a can of Coke for $1.00, you are silently telling the owner that you are willing to pay $1.00 for that Coke. If he raises the price to $1.25 and you don't come back any more, then the owner also knows that you are unwilling to pay for a Coke at that price. So without saying anything, you have negotiated with the store owner. This is the first part of how stores decide on prices; there is a negotiation between you and the store owner, and sometimes it happens when you silently choose to buy or not buy. This is just as true for gas, clothes, toys, food, whatever; store owners spend a lot of time figuring what is the best price for them to sell a lot of products at a profit. If he gets greedy and raises price too high, he actually loses because people will stop buying.
The second part of how the store owner decides the price, happens when the store owner goes out and gets the Coca-Cola to sell to you. When the store owner goes to a Coca-Cola distributor, the negotiation is a little more direct, as he wants to ask for a low enough price that he can make money selling the Coke to you. Otherwise, he will go out of business. The distributor also has to sell at a high enough price that he can make money too, or he is going to go out of business.
In the real world, there are not only a lot of stores competing for the same Coca-Cola from distributors, but there are also many distributors competing to sell their product, and for that matter, many kinds of colas too. In such a case, colas are a commodity. Prices of commodities, or what we could call things with many buyers and sellers, have their prices determined in a manner that is a lot like an auction: suppliers put out "bids" by advertizing how low their prices are, and store owners "bid" by choosing to buy from a particular supplier. Usually, sellers start with high prices and work their way down, and they keep working their way down until all of their goods are bought. If the amount of goods are short, prices will rise because there isn't enough left over for the cheap buyers. If there are a lot of goods, prices go down because the people who would pay a high price only have to pay slightly higher than the people who are going to buy most of the goods. Remember from earlier, the three drivers here are the how low a supplier is able to sell, how high of a price people are able to pay, and how much people want the stuff that's for sale.