To answer your question (and a lot of other "How’d they do that?" Questions) : It’s not how it seems. They made it looks like that’s what happening, but it’s not.
In this case Chris made it look like the button is inside of the search field. If you keep typing into the search field, you’ll notice that your text never reaches the "submit button"
He’s got the background image that has the outline of the search box:
Then he put an "input" field with no borders or background color.
The Submit buttons is just a normal <input typle="image"> that submits the form