RUN - This is an image build step. Any changes made to the container after a RUN command will be saved in the container image created. You can have mutiple RUN commands as layers on top of each other to create the image.
CMD - It is a command that is executed when a built image is launched by default. There can be only one CMD command in a dockerfile.
ENTRYPOINT - very simillar to CMD & can be used to change how container is started from an image.
Learn more on how you can create a dockerfile and the different commands used in it and a lot more things in the docker training course.