What are you going to do after you graduate with your CS degree? This is something that many students don't think about until their senior year, when they are approached by potential employers, and they notice their peers going on interviews.
Going out into the world to work as a programmer or software engineer is one option, and it is the one most students will take. I'm not writing this advice to tell you that it's a bad option! It's often a very satisfying and sometimes a lucrative option. But there is another option to consider, and I've been surprised to discover how many students don't really think about it: grad school. This is not something you have to do right after you graduate; many people go back to grad school after working.
If you've attended a major university with graduate programs, you've probably encountered graduate students. As you'd expect, they are people who already have an undergraduate degree, and are continuing their education.
There are typically two kinds of graduate programs to consider. Masters programs are usually 1-2 years if you attend full-time, consist primarily of coursework, and can be described as professional degrees (kind of like a degree you get if you go to law school, or medical school, but somewhat faster). Some masters programs are meant for people who are working full-time, and as such offer classes in the evenings. I haven't checked the statistics, but chances are good that an appropriate masters degree will land you a higher salary and maybe a place higher on the corporate ladder than your undergraduate degree. Some masters degrees have a research component, perhaps even a masters thesis.
The other type of program is a Ph.D. ("doctor of philosophy," written backwards because it's in Latin). This is the degree your professors have. A Ph.D. is different from a professional degree, and unless your parents or someone you know well has one, you may not really know what it is or why someone would get one. (I certainly didn't, at least until I was a college junior.) A Ph.D. is a research degree. You earn a Ph.D. by - to put it very simply - carrying out a body of creative, novel research that meets the standards of a scientific (or engineering, or humanities, etc.) community. Most Ph.D. programs involve some coursework, some form of exams, and working closely with a faculty advisor. In CS, a Ph.D. typically takes 5-7 years to complete.
For some people, research is incredibly rewarding, and making a new breakthrough is an intellectual experience unlike any other (one anonymous professor I know describes it as "better than sex"). Even for those who are successful at it, it has its ups and downs, and there can be considerable frustration in transforming your mind from being a good CS student to being a good CS researcher. It's not for everyone. If you are intrinsically motivated, like to learn, are exceptionally creative, and have strong reasoning skills, research might be for you.
The best way to find out is to try it. Many faculty members are willing to hire undergraduates for summer research, or to mentor them on independent study projects during the school year for credit. If you've taken someone's class, done well, and found the material really interesting, don't be afraid to go talk to him/her and find out more about what they're doing and whether they might be open to working with you.
(A tip: working on research as an undergrad, and especially doing so successfully, will make you a much stronger candidate when you do decide to apply to grad school. A recommendation letter from a faculty mentor who really knows you and can tell an admissions committee about your strengths will set you above the crowd.)
You may be thinking, "More school? How much is this gonna cost?" One thing many CS students don't know is that, in the United States, CS Ph.D. students (in the vast majority of cases) generally do not pay tuition for their Ph.D. In fact, the university typically pays you a stipend, because you are contributing to the university's research enterprise. Different schools work differently, and the same "deal" is not offered in all fields (engineering and the sciences tend to receive considerably more research funding than the humanities). But in CS, an offer of admission to a Ph.D. program typically includes an offer of financial support while you're in good standing in the Ph.D. program. Yes, you can get paid to keep going to school. It's not as much as you'd make in industry, but it's enough to live on.
Masters degrees are typically not funded, meaning that you normally have to pay tuition (like law school, medical school, etc.). If you work for a company and the company sees a benefit to you getting this additional training, then they may help pay for it. (Ph.D. students are not normally employed outside the university while they are students; remember, it's a paying job.)
A Ph.D. is a credential that implies you've contributed a solid body of meaningful research. With few exceptions, you need to have one to become a professor (or be very near to having one). But that's not your only choice. Remember those companies who want to hire you when you graduate? Many of them have research labs filled with Ph.D. doing all kinds of work, sometimes surprisingly "basic" (i.e., not applied directly to the company's products) and sometimes refreshingly grounded in real-world problems. Newly-minted Ph.D.s are often on the cutting edge of new technological trends and go off to start new companies (Google was founded by two Ph.D. students, though they left the university to start the company and haven't yet gone back). And yes, you might choose to stay in academia if you like to teach.