I am an Indian studying in Toronto, returning to India via USA in a connecting flight. Do I need a transit visa?
Yes, Indian citizens require a visa for the US, no matter how long or whether it's just a connecting flight.
Some countries can use the Visa Waiver Program, while others, including India, need to apply for a visa (source: US Department of State).
For information on applying for a visa, I recommend having a look at Immigroup's page on US visas.
More info on who needs or doesn't need visas for transit or visiting the US: WorldTravelGuide's page on the USA.