Branch prediction is a technique used in computer architecture to improve the flow of instructions in the pipeline by guessing the outcome of conditional operations. Accurate branch prediction enhances CPU performance by minimizing delays caused by control hazards, thereby increasing instruction throughput.