I would say a computer scientist does research (or applied research) on the theory of computation or one of various applications. For example, a computer scientist may research methods of solving differential equations, or optimal ways for a message to traverse a network, or improved image processing algorithms or the like. A software engineer will use engineering and computer science principles to develop large, highly reliable and effective software systems. A programmer (in my opinion) may not have developed engineering skills but can successfully develop and maintain computer programs. There is a lot of grey area between this somewhat arbitrary definitions.
In my experience, the average computer scientist is not a stellar programmer (there are exceptions of course) and typically doesn't have the wide range of tool/stack/api knowledge a lot of programmers do. It's more of an applied math field than anything.