Why is the inductor necessary in an LC filter?
Why is the inductor necessary in an LC filter?


This is a bit of a nomenclature problem.  LC means "Inductive"(L) "Capacitive"(C).  An inductor is not necessary in all types of filter, for instance an RC filter limits the charge rate of the capacitor with a resistor, but is less efficient by nature, since an inductor would use impedance rather than resistance to achieve the voltage drop.


  I am using an LC filter for the output of a buck converter. Dont both the inductor and capacitor just attenuate high frequency signals? 


Specifically, what an inductor or capacitor do are:

An Inductor generates a magnetic field proportional to the current flowing in it.  This magnetic field stores energy and when applied voltage is removed and current decreases, the inductor will deposit the energy back into the circuit to maintain current flow through itself.  The effect is that the inductor resists changes in the current flowing through it, and it does so proportionally to it's inductance.  Inductors will cause current to lag behind voltage.
A Capacitor stores energy on the surface of two parallel plates separated by an insulator.  When a voltage is applied to a capacitor, the capacitor sinks or sources current proportional to the difference between the applied voltage and it's current voltage. The closer the voltage on the capacitor is to the applied voltage, the less current flows.  Whereas an inductor resists changes in the current flowing through it, a capacitor resists changes in the voltage on it's terminals.  A capacitor will cause current to lead voltage. A good mnemonic for remembering which component that leads and lags the current is the word "CIVIL". 

Different types of filters will attenuate different frequencies. 


  Does having the inductor affect the output voltage or does it just affect the noise of it?


Especially if you are trying to build an efficient power supply, resistance is to be avoided, but the side effect of low resistance is that if the output is connected at the same time as the input, input voltage will be applied directly to the output while the input is on, so if the device powered is sensitive to instantaneous voltage, it could be destroyed.  Using an inductor, you can average out the output voltage on a switched mode supply without limiting capacitor charging speed with a large resistance.  This is far from the only application of an inductor, but suffice to say you've got to do some math to figure out their effect on a complex signal type. 

Draw a switched mode circuit with a capacitor and load across the output, but no series inductor and resistor, and you will see that when the switch is on, you have applied full source voltage to both a capacitor and the load.