What Tesla did
Tesla changed the way we deal with electricity by changing the typical setup of a motor. Traditional motors had been constructed with the a uniform magnetic field located in the stator (the stationary component) and a changing magnetic field in the rotor (the rotating component). A basic model of an AC motor is shown below.
 
http://www.learnengineering.org/2013/08/three-phase-induction-motor-working-squirrel-cage.html

Tesla modified the design so that each component of the stator would have three different windings which are arranged in a way so that the voltage produced is exactly 120 degrees out of phase with the others. This is rather complicated to explain in full but the basic principle of the process is that a when current passes through the windings in the stator it causes a magnetic field to be produced in the wire.


http://www.reuk.co.uk/OtherImages/moving-magnet-past-wire-to-make-current.jpg

Because each element of the winding is at a different phase this means that as AC voltage passes through the windings there is a constant change in the magnetic field being generated. The rotor is affected by this magnetic field and is rotated by the force of the magnetic field. This is in essence the basic energy transformation of electrical energy into mechanical energy. Below are two examples of AC motors that Tesla created.

 
    http://www.teslasociety.com/hall_of_fame.htm

http://www.teslasociety.com/hall_of_fame.htm
Why AC?
So up until this point I have tried to talk about AC and DC current but it might be helpful to understand the distinction between the two. Alternating current (shockingly) alternates and direct current does not.  


http://www.toptenz.net/wp-content/uploads/2010/09/Direct-Current-Alternating-
Current.png

AC current is what runs through power lines and outlets, while DC current comes form direct sources such as batteries. The reason for using AC for power transmission are varied but the main reason is that AC is much easier to "step-up" which means using a transformer to increase the voltage. AC voltage is very easy to increase which is necessary if the power is going to be traveling long distances. Voltage is lost when it travels through wires because there is some resistance in the wire so the voltage put in at the power plant is not the same as what will actually makes it to your door. AC is much easier to increase and thus is much more efficiently transferred across long distances. Another reason for AC is because of it's oscillations it produces significantly less heat in a line than DC. This makes power lines safer and less likely to overheat and fail.

One other rather ironic aspect of AC vs DC is that AC is actually less harmful than DC. Despite Edison's gruesome demonstrations with AC, if he had used a DC source the lethal amount of voltage would have been significantly less.