Yes, it must be a php page. The contact form includes php code for sending the email and performing validation, the server side PHP code will not be processed if the page is an html page.
The contact form is set to redirect to the thank you page after the email is sent.
The 404 error means the thank you page cannot be found.