Adding to Mr.Frodo's answer, this is taken from 'Getting Started with SOQL'.
Using the LIKE operator, we can retrieve records that match the substring provided.
The LIKE operator is mainly used to compare a value to all similar values using
wildcard characters. The LIKE operator is also called the pattern matching filtering
technique. Any record that matches the pattern alone will be retrieved, which
improves the filtering.
A sample query is given as follows:
SELECT Name, Amount FROM Opportunity WHERE Name LIKE 'Test%'
The preceding query will retrieve all the Opportunity instances where the name
starts with Test.
The Opportunity instances whose names end with Test will not be included in
the results. If we also want to include names ending with Test, we have to use
another percentage symbol to the left so that it will be '%Test%'. When we do this,
any Opportunity instance with Name that includes Test will also be included in
the result. We have to use _ instead of % if we want to just match it with a single
character to its left or right. The LIKE operator is very useful if we are unsure about
the exact value with which we have to match. While using the LIKE operator, make
sure you have entered the correct matching pattern. For example, the '%Test%'
matching pattern will not be as efficient as 'Test%' due to the way indexes work
and may take a longer time to retrieve the result set of a large object.