You buy a mass quantity of an item for market price. You then sell these items for max price. When you sell it at max, the market price rises making the items more expensive.
The best way to tell if an item is about to drop in price is to first check if it is being merchanted by large merch clans. If they are dropping it soon, it would be best to stay away from that item. Secondly, you can use the Grand Exchange website to look at the 30 day graphs. If an item seems to have reached a stable peak, you can predict that it will drops soon. This is the best time to sell. If the item has started to drop, sell it as fast as possible, or you risk a lower profit.