Both basic and applied research are important to the advancement of human knowledge, but they work in slightly different ways, and they have different end goals in sight. Basic or pure research is conducted solely for the purpose of gathering information and building on existing knowledge, as opposed to applied research, which is geared towards the resolution of a particular question. A neurologist who studies the brain to learn about its general workings is doing basic research, while a neurologist who is searching for the origins of Alzheimer's disease is involved in applied research.
Often, applied research builds on existing basic research. Basic research could be considered the foundation of knowledge which provides people with the basic information they need to pursue particular areas of research. In the example of the two neurologists above, for example, the neurologist involved in applied research on a neurological condition will probably use research published by the neurologist who is more generally studying the brain.
The lines between basic and applied research can blur. For example, a researcher playing around with batteries and methods of storing energy might accidentally stumble upon a revolutionary battery which could be utilized as a commercial product. In this case, research conducted to more generally develop ways of understanding and storing energy could have an immediate real world application, such as storing solar power trapped by the solar panels on a house.
In basic research, general theories, ideas, and questions are explored and tested, from where the universe comes from to how animals communicate. Some people have suggested that this type of research should not have priority, because it doesn't always result in an immediate benefit to humans, but without basic research, many applied research programs would be hard-pressed to get the start they need. Doing basic research ensures that applied researchers don't need to reinvent the wheel every time they start on a new project, because the groundwork has been done.
Some researchers prefer to focus on one type of research or the other, addressing natural curiosity or concerns about specific problems faced by humans. Others may flit back and forth, or find themselves starting a project which could be considered basic which turns applied, or vice versa. Flexibility in research is critical, as it promotes innovation and new approaches to scientific problems. Basic research is sometimes criticized as a funding hog, but in fact both types of research can be costly, and investing in basic research actually saves money in the long run by promoting the exploration of general knowledge.