I have a wordpress website, which when I visit
it throws an error 404 page.
Which class in wordpress handles the request dispatching?
404 errors are handled browser site and has nothing to do with Wordpress. When nothing is returned from the request, the browser triggers a 404 action and displays a 404 not found error page
By default, if no custom 404 page exists on the site, the browser will display its own default 404 page.
For further reading, check out: Creating an Error 404 page