This might seem like a strange question to many people who haven't studied computer science. The reaction I get most commonly is "Computer science is the study of computers, right?" The answer to that question is "no" and this common misunderstanding is the reason why it's important to write about this.
There's a famous quote from Edsgar Dijkstra, one of the "founding fathers" of computer science, which goes like this:
Computer science is no more about computers than astronomy is about telescopes.That's a bit of an extreme stand (and Dijkstra was known to have taken some pretty extreme stands), and while I won't stand behind that quote as a perfect statement, there is enough truth in to make it an excellent quote that makes people think about and re-examine their notions of what computer science is. People who study computer science usually end up working with computers, and the study of computer science prepares people very well for such jobs. However, don't confuse the application of the science, or the tool that computer scientists often use, with the science.
Computer science is about computation — computation is an abstract concept that is not tied to a particular technology or tool, and the abstract nature is frustratingly hard to explain to people who have not specifically studied computing. Merriam-Webster defines science as "knowledge or a system of knowledge covering general truths or the operation of general laws," which fits computer science exactly. The "general truths" correspond to computation as a fundamental activity, and would be the same regardless of whether electronic computers had ever been invented or whether Bill Gates had ever been born (and certainly don't depend on whether you're a Mac or a PC!). The most important thing to understand is that the general laws of computer science were exactly the same 2000 years ago as they are today, and will be the same 2000 years from now. When Euclid came up with an efficient procedure for computing greatest common divisors around 300 B.C., he was doing computer science — it's just that no one called it that at the time (or for millenia afterwards!).
You can do computations with modern digital computers, with the human brain, or with the aid of an abacus or a calculator or some other tool. When you try to discern the nature of the computation, independent of the tool (computer, brain, calculator, ...) then you're thinking about computer science. What the invention of the electronic computer has done is allow us to do far more complex computations than were previously possible (billions and trillions of times more complex), making understanding the fundamentals of computation much more relevant, and bringing computer science into its own as a field.
Let's look at an example of how different aspects of computer science come up, in a setting that doesn't (necessarily) use digital computers: Lots of people like solving puzzles, so consider Sudoku puzzles. Based on the number of Sudoku puzzle books out there (and the 10,000,000 hits for "sudoku" on Google), there are a lot of people that like to do these puzzles. If you do one or two of these puzzles you sort of muddle your way through, putting in numbers and seeing what works. However, as you do more and more, you start to develop rules and processes that help make your puzzle-working more efficient. Congratulations, because now you're doing computer science!
Developing a process or procedure to solve a problem via a set of well-defined rules is what we call developing an algorithm, and this is the heart of computer science. An algorithm is simply a computational procedure that can be applied to a class of problems (like Sudoku puzzles). A great deal of computer science deals with methods for designing algorithms (broad problem-solving methodologies) and analyzing them in order to judge the quality of the algorithm (will it always solve the problem? how long will it take? how much information do we need to keep track of with this solution?). If there is a lot of data to keep track of as you solve your problems, you might want to organize it so you can find the right information quickly — that's the study of data structures.
So now that you've worked some Sudoku puzzles, and have made some rules that you use in solving these puzzles, could you explain them to someone else? For most people, the rules are a jumbled mass of ideas that they understand and can apply, but if you were to ask them to write down the rules in a clear and unambiguous way you'd have some problems. Regular English speaking and writing is full of ambiguity — that's not a bad thing for living in a complex and creative world, but it's a terrible thing for describing a process that has to be conveyed clearly and unambiguously. Obviously we need a different language, something unlike regular spoken language, that is logical, clear, and unambiguous — that's what computer scientists do when they study programming languages. There several distinct types of programming languages (and 1000's of actual languages) that reflect different ways of describing computations — a good computer scientist understands different ways of describing solutions, and can make an intelligent decision about what type of language best fits the computational solution that they envision. Such a computer scientist would never approach a problem saying something like "I know Java so I'll use it for everything" (this is like the carpenter whose only tool is a hammer).
So now you've derived your Sudoku solution, and you've got a way to describe your solution — now what? Let's automate the solution! We can think of building a machine that follows your instructions (written in your unambiguous way) and solves problems for you. What types of things could this machine do? Can we design a machine that can solve not just Sudoku problems but many other problems as well? Could we design a machine that is in fact so general purpose that it is possible to use that machine to solve any problem that has a computational solution? Or for that matter, do all problems even have computational solutions? These are exactly the questions that computer scientists look at in theory of computing. Both the problems and answers are fundamental and deep, and this area is vital for understanding the nature of computation. For those of you reading this who are not computer scientists, the answers are "yes, you can design a machine that can solve any problem that can be solved computationally" and "no, not all problems can be solved computationally." Understanding these issues and how they affect real-world problems is something every good computer scientist should be able to do.
Once we understand in a general sense what sort of machine can automate our Sudoku solution (or other computational solutions), how to we actually build a machine to do this? If we have physical devices (like transistors) that can be used to perform small logical operations, how can we combine these so that we can efficiently carry out our instructions? What physical characteristics of the devices (such as memory access speeds) affect how we organize our machine? Can we do more than one operation at a time? Understanding these issues is the computer science area known as computer architecture (although low-level issues, dealing with transistors and pieces of silicon, are usually studied by electrical engineers or computer engineers — this is one area where the dividing line between fields is pretty blurry, with lots of overlap).
Finally, as we have a machine with specific and limited resources to solve our computational problems, how are the various resource managed? If the machine is working on several problems at the same time, how do we decide how much storage to give to each problem? How do we keep the processes separate so they don't interfere with one another? How do we coordinate access to shared data and shared resources? These are the issues we look at in operating systems. For many non-computer scientists, the phrase "operating system" means a specific piece of software, like Windows or Mac OS X, so people think that the study of operating systems must be the study of this software. However, to a computer scientist the study of operating systems is all about techniques for resource management — these issues transcend any particular machine or software, and are often stated in non-computer terms in order to emphasize this fact (with names such as the "dining philosopher's" problem, and the "firing squad" problem, and the "Byzantine agreement" problem). The people who developed Windows or Mac OS X used these principles in designing the software they produced, but these are the products of the principles that we study, not the focus of our study.
So there you have it: a brief tour through computer science. And please keep in mind that I'm not making analogies or saying this is "like" computer science. The activities I've described above are computer science, and none (with the possible exception of computer architecture) are dependent on using a computer. Computers are great tools for doing computation, and once we know how to design, describe, and reason about computations there's really no better way of performing computations than to use a digital computer. But our job as computer scientists it to take a step back and look at the fundamentals that underlie all computations.
If you look at any degree program in computer science, you'll see that it's built around the core issues I've just described: algorithm design and analysis, data structures, programming languages, theory of computing, computer architecture, and operating systems. These are the topics that allow one to understand computation and to apply it in solving problems, and this is what a computer scientist does. There are other areas as well, of course — trying to make the mathematical world of computation interact with the human world of people and spoken (or "natural") language is a primary thrust of artificial intelligence. Looking at how to communicate and coordinate the data used in computation when it is physically in different places is the study of computer networks. Studying the specific sorts of algorithmic and representational problems that deal with large amounts of data stored in non-volatile storage is the study of databases. And then there are the problems of applying these principles to create specific technologies, whether it's computer games, digital media tools, or other types of software.
The field of computer science is extremely rich, with the core science leading to an almost endless variety of applications. There are great opportunities for creativity and for solving some very important problems in a huge variety of fields — the modern digital computer has dramatically changed how many problems can be approached, and is transforming many fields. A student with a solid grounding in computer science is in a unique position to see these problems in terms of the fundamental issues, and to apply the tool of computers in creative and productive ways.