A caveat: 'Computer Science' has become a muddied field in modern times because (at least in the United States) universities do not have degrees in "programming". This means that people interested in programming must sign up for Computer Science degrees, and as a reaction to that the Computer Science programs emphasize programming more and more.
That said, Computer Science itself is a strongly mathematical science - Computational Mathematics might have been a better term. It involves the study of graph theory, algorithmic complexity, formal logic, automata, and in general any logical structure which can describe a transformation or response to input - algorithms. A Computer Scientist in the classic sense could reason about rules that govern any computing system (including modern computers) without necessarily knowing the details of implementation on current architecture. A strong background in Computer Science gives you the ability to develop (or recall) efficient, scalable algorithms, anticipate logical reductions, and reason soundly about what is tractable.
Programming, by contrast, is what a person does when they use a programming language to transform an algorithm into something the machine can do. (That should make obvious the intimate connection to Computer Science, and where much of the confusion comes from.) A programmer (relative to an environment and language) should be able to take virtually any set of algorithms and transform them into a form both human- and machine-readable by writing code. A strong background in programming (as most CS degrees will provide) enables you to write better code - where 'better' code is more easily understood by others and more successful in expressing the algorithm you are implementing.
There is a large amount of crosstalk, of course, and a high level of experience in one will correspond strongly with developing experience in the other - as noted, a CS major is almost always a competent programmer, and a seasoned programmer has picked up many principles of CS. Think Physics and Engineering.