PubMed has an advanced search interface. You can reach it via Advanced right below the search box. The advanced search interface consists of PubMed Advanced Search Builder and History and Search Details.
In the builder you can add search terms to the Query box. From there you can run a search strategy in PubMed. Searches from the History can also be added to the Query box to be combined with other searches.
Watch the Advanced Search Builder demo (2:06) below by Laupus Health Sciences Library (East Carolina University).
Use boolean operators to combine searches, for example to complete a search concept by combining MeSH terms with searches for words in the title and abstract ([tiab] searches).
OR
Use OR to find publications that match one or both search terms. OR is used to widen your search (OR=mORe).
Example: diabetes mellitus[mesh] OR diabetes[tiab]
AND
Use AND to find publications that match both search terms.
When looking for articles on gene therapy for diabetes, use:
diabetes mellitus[mesh] AND genetic therapy[mesh] or even better:
(diabetes mellitus[mesh] OR diabetes[tiab]) AND (genetic therapy[mesh] OR gene therapy[tiab]).
When combining AND and OR, make sure that the ( ) are correctly placed. Searching with (diabetes mellitus[mesh] OR (diabetes[tiab] AND genetic therapy[mesh]) OR gene therapy[tiab]) gives a very different result...
NOT
With NOT all publications that match a certain term are excluded.
If you are looking for articles on diabetes, but not gestational diabetes,
you could enter: diabetes mellitus[mesh] NOT gestational diabetes[mesh].
Note that articles on both types of diabetes will also be excluded.