Steel consists of two main forms, ferrite and carbide. The ferrite is the main part, and refered to as the "steel matrix" as it is what everything basically sits in. Think of it like concrete which consists of cement (ferrite) and sand+rocks (carbide).
Elements like Chromium can be free in the ferrite, meaning they are not attached to anything, just hanging out, or can bond with carbon to form carbides (which are essentially just little hard bits in the steel) and they are no longer free to bond with anything else as the carbon keeps a tight hold on them.
Now when the surface of the steel is struck by an oxygen atom it will attack any available ferrite and combine with iron to make an oxide (rust) and which is soft and weak and brittle. However if there is chromium in the ferrite it will jump infront of the iron in a noble sacrifice and you will get chromium oxide formed.
The chromium oxide will actually form a layer on the surface of the steel unlike the iron oxide and will actually stop any more oxygen from getting inside and it just bounces off the chromium oxide barrier and then wanders off looking for better grazing areas.
However if the chromium is in carbide form, it is attached to carbon already and when the oxygen comes in hungrily for the ferrite, the chromium can no longer protect the iron because the carbon will not let it move and so the oxygen will readily start consuming the iron and making rust.
Now what is the good side to the carbides? Ferrite is really weak and easily machined, the carbides make it much stronger and give it much better wear resistance. Thus you have to pick one or the other, you can't optimally have maximum corrosion resistance or wear resistance and strength at the same time because the chromium can't be in two places at once.
In regards to steels, the basic point is you can't just say more Cr = more corrosion resistance, you need to have the Cr free in the ferrite so check the carbon content because if it is high the carbon will have locked up the Cr in carbides, this is why 440A is much more corrosion resistant than 440C even though both have the same Cr content.
This is further complicated as there are other elements such as vanadium which will actually knock chromium out of the way and take the carbon from it which will also allow for free chromium even with a lot of carbon because the chromium does not have the strength to push the vanadium out of the way and get any carbon of its own so it just hangs out in the ferrite waiting for oxygen.
-Cliff