The RAT is automatically deployed on many aircraft, including the CRJ and A320 series, but it can be manually released as well. In between the loss of power and the RAT spins up you have the batteries to fall back to which are normally fully charged.
The Airbus Manual has the following comment on the APU:
In case of total loss of all main generators, the RAT is automatically
extended and drives the emergency generator via a hydraulic motor. The
EMER GEN supplies the AC ESS BUS and the DC ESS BUS via the ESS TR.
The ECAM WD remains powered, with associated procedures presented.
Alternate law is operative through ELAC 1 and SEC 1
(Source)
While this is for the CRJ, who call it an Air Driven Generator (ADG):
In the event of a complete AC power failure in flight, the ADG will
automatically deploy and supply emergency AC power to the ADG bus and
to the AC essential bus. If the automatic deploy function fails, the
ADG can be deployed manually by pulling the ADG manual release handle
on the ADG CONTROL control panel at the rear of the center console.
(Source)
A RAT, with the spring loaded actuator visible:
I think most if not all are spring loaded, and have a little help from gravity on the way. You'll also notice that many are stored to be pushed into place by the jetstream.
Have a look at this video below around 0:20. The slow upwards motion suggests that it's having to reload the spring energy at 1:20. The doors are attached mechanically.
Taking a look at the Airbus Electrical System:
As can be seen, there's a hierarchy to electrical power use, and the battery feeds the essential busses, where the RAT deployment would be included. If I'm not mistaken, power is very limited: You loose some of the more fancy control computers along with the non-necessary stuff, like the copilot's displays, as can be seen in the following video.
Bear in mind that some aircraft, such as the 747 (up to -400), do not have a RAT on the aircraft, and rely on the windmilling engines to provide sufficient hydraulics to control the aircraft, and as such there's no deployment of sorts necessary.