Consier it this way :
a transistor is basically two diodes joined back to back. Right ? When working as an amplifier ,biased one of the diode is forward biased whereas the other reverse biased.
As first one is forward biased it conducts and a current flow through a low resistance region ( Forward biased ).
But current can't go anywhere but though other diode which is reverse biased. hence now same little current flows through a very high resistance region.
This low current multiplied by high R results in V= I(low) R(very high)
hence Vout becomes much higher than Vin.
Thanks