A programming language defines a set of instructions that are compiled by the CPU to perform tasks. Programming languages can be classified as low-level or high-level based on their level of abstraction from hardware. Low-level languages like machine code and assembly language provide little abstraction and are closer to binary machine instructions, while high-level languages like C++ and Python provide more abstraction and are easier for humans to read and write.