There are a few ways to get non-spontaneous reactions to proceed. One way is to couple them to a process that is spontaneous. For example, the formation of ATP from ADP and phosphate is a very important reaction in biology. However, producing ATP from ADP and phosphate requires an input of heat from the surroundings and, because there are two reactants but only one product, the reaction results in a decrease in entropy. Therefore, when you put ADP and phosphate in a beaker, nothing happens.
Cells, however, have devised a clever way to produce ATP. By oxidizing food molecules, cells produce a proton gradient in their mitochondria: the inside of the mitochondria has a low concentration of H+ ions and the outside of the mitochondria has a high concentration of H+ ions (1). Therefore, flow of protons into the mitochondria is thermodynamically favorable and can therefore perform work. The cell uses this flow of protons to power ATP synthesis, much like a dam uses the flow of water downhill to power electrical generators. Therefore, the gain in free energy from converting ADP and phosphate into ATP is offset by the loss in free energy from protons moving into the mitochondria.
This general principle--some exterior system performing work on your system in order to raise it's free energy--applies in many other cases. Applying an electrical current to recharge a battery is another example. Here, electrical work allows to battery to perform thermodynamically unfavorable electrochemical reactions (e.g. using Ni2+ to reduce Cd2+).
(1) note: this is a simplification because mitochondria actually have two membranes: an inner membrane and an outer membrane. We'll just ignore the outer membrane of the mitochondria and just consider what happens on the inside and outside of the mitochondrial inner membrane.