How do you connect blue and red wires to black and white?

Quote from the video:
Quote from Youtube video: You next connect the hot live wire from the old switch to the black wire on the dimmer. Connect the remaining wire that goes to the light to the red wire on the dimmer.