Software programs are sets of instructions that must be translated into machine code before the CPU can execute them. The CPU performs basic functions like arithmetic, data movement, and decision making to carry out more complex tasks as specified by software programs. It executes programs through a fetch-decode-execute cycle, fetching instructions from memory based on the program counter before decoding and carrying out each one.