I want to know, is there a huge difference in terms of SEO between these URLs:
example.com/ontario/toronto/listings
or
example.com/listings.php?p=ontario&c=toronto
Will one URL rank higher than the other? Is there a huge difference here?
Search engines can read query strings just fine so both are acceptable to use.
The first example you use does offer more benefits for SEO since it clearly creates a hierarchy with broader categories to the left and more specific categories to the right. It's also good for usability since it is easier for humans to read and remember.
But overall this won't have a large impact in your rankings.
@John Conde is right. The first URL has a hierarchy, which Google prefers.
Have a look at this Google Search Engine Optimization Start Guide (PDF link) Pages 8-11 specifically