Dropout Voltage for Linear Regulators
The dropout voltage is the minimum difference in voltage between the input and output voltages of the regulator required for proper operation.
A linear regulator can only reduce the voltage, so if you supply 9 volts to a 12 volt regulator it will output somewhat less than 9 volts.  For the 78xx family of linear regulators, the dropout voltage is 2 - 2.5 volts, so, for your example, I'd expect the regulator to output under 7 volts.
To get 12 volts out of a 7812 regulator, you would have to supply at least 14 volts.