The reason contrast showers are effective is because of the 'shock' effect, so it's really best to go from as hot as possible to as cold as possible.
The hot increases body temp and circulation as long as you don't exceed about 3 minutes. The cold constricts blood vessels and also boosts circulation if you keep it to under 1 minute. If you go longer it will depress circulation.
The contrast of going back and forth creates a 'pumping' action and encourages lymphatic flow, stimulates circulation, healing, detoxification. I don't know of any studies per se, but it's not really a highly disputed theory as far as I know. The effects of heat and cold are pretty much accepted - using them together just boosts the efficacy of each.
Be sure to end on cold though, especially if you're focussing on an injured area (for example, I always end on cold and then let the cold water run directly over my ankles since I have an injury prone right ankle - I've really noticed it helps keep it happy and encourage healing if it does act up).