Main memory, also known as RAM, is a volatile storage medium that temporarily holds data and instructions that the CPU needs while executing tasks. It plays a crucial role in determining the speed and efficiency of a computer's performance by providing fast access to data compared to secondary storage like hard drives.