Michael McGraw-Herdeg explains how airline tickets work:
Airlines are trying to maximize revenue per flight. This means charging more or less over time depending on what they predict will maximize total revenue for the flight -- using sophisticated quasi-academic tactics which they call "revenue management" or "yield management".It's not very good to leave a lot of seats empty (you charged too much and could have made more money with a sale). It's also not good to go out completely full (you charged too little and are losing money on the trip).
Read the whole thing to learn about how inventory and fares interact in real-time. There's also this bit, which I didn't know:
Every few months, US airlines try to push a $2 or so hike across the board on all of their base fares; if their competitors match, the new price point takes hold. This is sort of a macroeconomic tweak.