How do Web sites do boolean searches?

For instance, a user could type "apple AND pie" and it would only return results that contain both and pie.