You can control what is indexed and available for search in the search settings.
The site you link to is using the theme Thanks Roy (the default theme) and in the theme configuration settings they’ve turned on advanced site-wide search. That setting is available in most themes; be aware that if you switch themes you will have to turn it on again.