Thomas Edison was supplying electricity in New York with direct current. Those systems were bad causing fires and other hazards like electrocution in homes. When Nikola Tesla arrived to New York, he began working for Thomas Edison.
The first task assigned to him was fixing his direct current motor a a prize of $50,000. When he finished that, Edison didn't kept his world so Tesla walked out the place never to return.
Later in life, his alternate current beat Edison's direct current system and it was chosen for the 1893 fair. Edison in envy put in court that Tesla couldn't use his bulbs. So the Westinghouse co. made the bulbs for the fair.
Thomas Edison and Nikola Tesla had a professional rivalry as both were inventors with differing approaches to technology. Edison believed in direct current (DC) while Tesla advocated for alternating current (AC). Their conflict culminated in the "War of Currents," where Edison's company tried to undermine Tesla's AC technology, but ultimately, AC emerged as the more efficient and widely adopted electrical system.