Thanks for your support, everyone

I tried filling out the contact form. After successfully submitting the form, I stayed on the home page, but the form changed into a 'thank you' statement. How do you do that? I thought I had to direct visitor to another success page.