Most community colleges do not offer a four-year degree. Instead, community colleges focus on helping students finish their general education classes, a requirement for everyone, no matter what college they attend. Students who may not know what they would like to major in may choose a community college so they can take a few classes without making a huge commitment to a whole string of classes and wasting money. After completing general education classes and any other requirements, students can transfer to a four-year college and earn a bachelor's degree the same as anyone else who went straight to a four-year college.
Students often save money by going to a community college first and getting the same classes out of the way at a fraction of the cost. Community colleges charge by the unit, whereas four-year colleges charge a flat rate for classes, usually a lot more expensive than what you would pay per unit at a community college.
While you can minor in subjects at a four-year college, being able to get an associate degree or a certification in a subject is less likely. Because people take community college courses for several different reasons, there is a better chance there will be availability for classes you may want to take. At a four-year college, because not everyone who applies is admitted, fewer class times are available.
Going to a community college is not a bad thing. People may often make jokes about it and claim that it is not "real" college, but community colleges are accredited. In some cases, going to a community college is a smarter choice than going straight to a four-year college -- it all depends on your needs and goals.