I was reading that aircraft like the F-15 and SR-71 have movable inlets. What's the purpose of this?
I was also reading aircraft like the F-22 doesn't have a movable inlet. Why?
Jet engines require the air that flows into them to be subsonic. Supersonic air hitting the front fan would cause shockwaves inside the engine, with undesirable results.
So the job of the intake on a supersonic aircraft is to slow down the air to subsonic speeds. The intake is designed to set up a series of shock waves. The air will slow down to subsonic speed as it crosses these shockwaves.
The location of these shockwaves changes with speed: the higher the speed, the shallower the angle of the shockwave and the further the shockwave will reach down the intake duct. So if you have a fixed-geometry inlet, your maximum speed is limited: there is a speed at which the shockwaves will intersect the front fan.
Variable intakes avoid this problem: the movable vanes in the inlet aim the shockwave so it stays in front of the front fan at all speeds. This enable a higher top speed to be reached.
If you accept a lower top speed, you can avoid the extra complexity of a variable inlet. For the F-22, for example, a variable inlet would make it more difficult to maintain a low radar cross section, so the tradeoff was made to maintain stealth and lower the top speed.
I will leave the more accurate answer to someone with deeper knowledge than me, but here is an intuition.
A jet engine needs a certain amount of air flowing through it in order to work. It can't be too much air, and it can't be too little air.
The faster you go, the more air is "rammed" into the engine, just by virtue of you moving faster through the surrounding air. A variable geometry inlet allows you to "shape" the flow of the incoming air such that always the right amount of air is flowing into the engine.
The SR-71 operated from standstill to almost 3.5 times the speed of sound. Now, the sound barrier is particularly interesting, because a normal jet engine requires that the air flowing through it is subsonic. So, the SR-71 in particular had the capability that, by moving the "spike" in the inlet, the engine could transition between a "normal" turbojet engine (subsonic airflow in the inlet and in the combustion chamber) and a supersonic turbojet engine (supersonic airflow in the inlet, but subsonic airflow in the combustion chamber).