When you search PubMed it automatically looks for papers covering all the search concepts you enter. However, PubMed does not simply search for the exact words you use. Instead it 'translates' your terms in a sophisticated way, and searches for Medical Subject Headings (MeSH), as well as textword terms (words found anywhere in the record, such as the title or abstract).
You can see exactly how PubMed carries out your search by clicking on the Advanced link just below the simple search box. Scroll down and you will see that PubMed stores your History and Search Details.
To view how PubMed interprets your search, click on the arrow under Details:
PubMed has done quite a lot of complex work behind the scenes. You can see that each word has been searched as a phrase as well as individual words. Synonymous search terms and relevant MeSH terms have also been identified and searched for. For this example you can see that PubMed has translated heart attack into the MeSH term myocardial infarction.
It is always worth checking the Search Details after you carry out a search to make sure PubMed has interpreted your search terms correctly and has identified relevant MeSH terms.