
http://a.tgcdn.net/images/products/additional/large/ea08_tesla_edison_dd.jpg
The Start
June 1884 Tesla moved to New York and was hired by Thomas
Edison to work at the Edison Machine Works. He began as a simple electrical engineer but progressed rapidly. He was offered a challenge to improve the direct current generators that the company was making. Tesla successfully redesigned the entire machinery to generate AC power. This took him over year of personal work and was mainly spurred on by the fact that Edison had said he would pay Tesla $50,000 for modifying the design. When Tesla went to collect the the money Edison replied the Tesla just didn't "understand our American humor". Tesla promptly resigned from his position.
Middle years
An unsuccessful attempt to start his own business resulted in
him ending up in poverty and digging ditches for $2 an
hour. In 1886 Tesla met Alfred S. Brown and Charles F. Peck who agreed to back his inventions and helped him in 1887 for the Tesla Electric Company. Through their backing Tesla was able to continue his work on electric motors and various other devices including generators.
In 1887 he ended up creating a polyphase induction motor which produced an alternating current. The physics of the induction motor can be found on the AC page. Prior to Tesla's work alternating current had to be converted to DC current to run through a motor which was a fairly inefficient process. Tesla managed to streamline the task and provide motors with greatly increased efficiency.
George Westinghouse was seeking a AC power motor and in 1888 he worked out a deal with Tesla where he purchased the polyphase motor for $60,000 and hired Tesla for a year with a salary of $2,000. During this time Tesla worked for Westinghouse and helped create a power network for that would run on AC for the streetcars of Pittsburgh.
The war
Tesla was already at odds with Edison over the failure of
Edison to back his promise of payment in 1884, but what really
caused conflict between the two men was the issue of current.
Tesla was working with Westinghouse and pursuing AC power. Edison was firmly attached to his his DC power and this lead to serious conflict. Edison began a campaign in the 1880s that sought to convince people that DC was the preferable option.
His campaign relied mainly on convincing people that AC current was dangerous and in that vain he publicly killed various convicts and animals using AC current. The darkest example of this happened on Jan 4, 1903 where Edison killed Topsy the elephant in front of a crowd of 1,500 people. Edison had the event filmed and the footage is accessible by clicking the link below. A word of warning, the link below contains graphic material illustrating exactly how far Edison went to fight for DC supremacy.
Link

http://deathpenalty.procon.org/view.resource.php?resourceID=003749
Edison's efforts deeply hurt the reputation of AC current but even gross spectacles couldn't stop the invertible progress. Perhaps the biggest victory in the war over currents happened in 1893 when Westinghouse won the bid to light World's Columbia Exposition in Chicago. It was the first time in history the fair had been lit by electricity and it would be lit by AC power. Edison was non to pleased at this loss and refused to have his light bulbs used at the fair. At the time period there were no other light bulbs being created and this posed a significant problem to the fair. Tesla (and the time frame on this is debated), ended up spending approximately two weeks and creating a double filament light bulb that was more efficient that Edison's. The bulbs were manufactured and and so the first time the world saw what electricity could do was at the world fair where the lights were Tesla's and so was the power.
Edison's company would go on to become general electric which would continue to clash with Westinghouse over various patent laws and logistics.