The two major things that determine the stall speed are the engine torque and the torque converter. Here are a few different ways to think about it:
Lets say you are on an exercise bike that uses a large fan for the "load." The smaller the fan, the faster you can pedal it. The larger the fan, the harder it is to pedal it so your max RPM would be slower. With a small fan, you may be able to petal at 200 RPM and no faster, that means your stall speed is 200 RPM. With the large fan, you may only be able to petal at 50 RPM. The larger fan stalled you at 50 RPM with the same person on the bike. Two different fans, Two different stall speeds.
Now a professional athlete hops on the bike. With the big fan, they may be able to petal 100 RPM as opposed to your 50 RPM. To liken this to the engine and converter, you have to remember that the converter is nothing more than two fans, one fan is connected to the engine and the other is connected to the transmission. The fan that is connected to the engine blows oil at the transmission fan and when it blows enough oil at it the transmission fan will start to rotate, and the vehicle will start to move. In this scenario, with the engine and converter the same, if you install a converter with bigger fans, the stall RPM will be lower. With smaller fans the stall RPM will be higher, and if you add horsepower to the engine, just like the athlete, the stall RPM increases.
Now lets talk about air. It's all about the oxygen. A person on the bike can pedal harder at sea level than on the top of a mountain because they can breathe better. The closer to sea level, the more oxygen in the air. The air will be more dense, so will the engine. The engine is nothing more than an air pump that uses fuel. The fuel must burn, expand, and push the piston down. You must have oxygen to burn the fuel. The higher the elevation, the less oxygen we have, so the less fuel we are able to inject. Less fuel means lower power into the converter and therefore a lower stall speed. Normally, the higher the elevation, the higher the stall speed that is needed. The engine turbocharger also can make a huge difference. Like the converter, The turbo is also a set of fans, the drive fan is located in the exhaust of the engine and the exhaust flow makes this fan spin. The driven fan of the turbo is connected to the drive fan and sits in the intake side of the engine and forces oxygen into the engine so we can burn more fuel to get more power. When you have a turbo with bigger fans it takes longer to spool up and start to blow more oxygen into the engine. If it takes longer to spin up, it will take longer to get the oxygen into the cylinders to burn the fuel. This is called turbo lag.