Assuming you have booked a single ticket (as chx suggests in comments, you can enter the booking reference on aircanada.com to confirm this if there is any question), you can follow the "Connecting Guide" steps helpfully provided on the Toronto Pearson website by selecting "Arriving from International," "Departing to USA," and "Air Canada" for both the arriving and departing airlines.
You should review the detailed information there, but the basic steps are:
- Check the TV monitors and find your flight to New York. Confirm that it is on time and note the gate number
- Follow the signs for connecting flights toward your gate and go through airport security screening
- Follow the signs for USA connections. There will be airline representatives in this area, and these are the people who can assist you if you've been delayed or have other questions. You will not need to collect your luggage. You'll scan your boarding pass here and complete a US Customs declaration form.
- Proceed to US Customs and Border Protection. You'll present your passport and declaration form, provide biometrics, and answer any questions.
- Assuming you are admitted to the United States, you'll walk to your gate and wait for boarding. There will be more TV monitors in this area to confirm the gate number and flight status.
The good news is that, once you've done all that, you're all done with US immigration. You'll arrive at LaGuardia as if it was a domestic flight, and all you'll need to do is go to the baggage claim and pick up any checked luggage.
Air Canada has a (couple year old) video describing the process at YYZ, which might be helpful to you. There's a section for "Traveling to the USA from an international origin."
If there are delays such that you miss your connection, Air Canada will rebook you on other flights to New York. This could result in a significant delay to your journey.