Good question.. one common use is in a filter. A capacitor passes a high frequency signal easily, but resists low frequency ones. While an inductor does the opposite: it pass low-frequency easily, and impedes high frequency. In fact, inside most speaker enclosures you'll find an inductor used on the woofer to pass the low-frequency energy to the woofer, while a capacitor is used with the tweeter to pass the high-frequency energy to the tweeter.
The reason to use an inductor there is that it doesn't "consume" or "waste" the high frequency energy, it just blocks it from passing, so that energy can then pass through the capacitor, to the tweeter, instead.
In general, the behavior of an inductor is the dual to that of a capacitor, so most functions that require one can be implemented by using the other, but in a different arrangement. But that's not always true. For example, if you only want to receive low-frequency energy, you can put in a resistor, followed by a capacitor to ground. The high frequency energy will be "shorted" through the capacitor, and drop most of the voltage across the resistor (which turns the high frequency signal into heat), leaving very little amplitude across the capacitor. That works fine if you only want the information, so it's okay to waste the high frequency energy.. but in the case of speakers, it took a lot of work getting that high energy into the speaker box, so you need a way to filter without losing the energy!
That brings up a fundamental difference between resistors versus capacitors and inductors. Resistors turn the voltage across them times the current through them into heat. But capacitors and inductors do not! Ideal versions convert none of the electric energy into heat. Although real ones turn some percentage of the voltage across them times the current through them into heat -- that percentage varies with the frequency of the voltage/current.
Another common use of inductors is in oscillators.. imagine an inductor and a capacitor connected together at both ends -- there is some frequency at which both resist the exact same amount! That is called the resonant frequency of the combination. It turns out that once you get it started, the capacitor's voltage forces current to flow in the inductor, until the voltage reaches zero -- but now the inductor wants that current to keep flowing, so it does, and ends up charging up the capacitor, but to the opposite voltage it had before. When the current reaches zero, the capacitor starts forcing current again, and it builds up.. but in the opposite direction as before.. and the same thing repeats..
If the inductor and capacitor were perfect, then this would continue forever.. but they both lose a little bit of the energy, turned into heat.. so the voltages and currents are less on each repetition.. all that is needed to make an oscillator, then is a way to replenish the lost energy after each cycle.
The third common use is as an energy storage device, especially in switching power supplies. In that case, a DC power supply's function is to supply continuous current. It also has the function of going between an input voltage source and the output voltage is supplies. So, the fact that it blocks high frequency can be looked as: when the voltage across it is suddenly changed, the current through it does not.. rather, the current only starts becoming different. So, if you very quickly change the voltage to very high, then zero, then very high, then zero, the current will start going up, then start going down, but as long as you only leave either of the two voltages for a very short time, the current won't change much at all, in either direction. If you leave it high the same period as you leave it low, then the current will average out and stay steady. If that current matches the current being taken out of the power-supply, then the output voltage of the supply will stay constant. Now, imagine leaving the high voltage on a little longer than ground -- the current will increase slowly, over the course of many repetitions.. and vice versa. If the load keeps taking the same current, then the output voltage of the supply will slowly rise, as the extra current charges the capacitor between the output and ground. That is how a switching supply uses an inductor to change large input voltage into a smaller output voltage. There is a circuit that detects the output voltage, and compares against the desired voltage, and adjusts how much time the inductor is given the high input voltage versus ground, in order to change how much excess current there is to charge the capacitor on the output (see circuits posted with other answers).
Those are the only three common uses.. but some exotic circuits use the transfer function of an inductor in odd ways (for example, in older radar as part of a "steering" circuit to block out-going energy from blowing out the sensitive receiver). See also "gyrator", which can make a capacitor look to the circuit like an inductor (and vice versa)!