Is community college like high school at all?

If I were to take online classes, how would that work? Would that still equate to me being able to get a degree?