The cold -50 Freon passes through a heat exchanger and the warmer energy of the outside air (-25 C) naturally moves to the colder Freon across the heat exchanger. This causes the Freon to absorb the energy. As it heats up the Freon starts to evaporate (boil) and turns into a gas, The Freon gas is then brought to a compressor where it is compressed, causing it to greatly increase in temperature as its volume deceases. This hot gas is then transferred over another heat exchanger in which the other side is colder water/glycol and the energy again transitions from hot to cold and heats a water/glycol loop in the home. The refrigerant loses its heat, causing it to cool back to a liquid to begin the cycle again.
That is the basics of the refrigeration cycle. If you understand these basic principles, then you can get a grasp on how a heat pump works even in -25 C (-15 F). A heat pump is simply a means of transferring energy from one source to another. It is the same principle used in a geothermal heat which pulls the warmer energy out of the ground and delivers it to the house through a series of heat exchange processes.