Your computer's CPU uses RAM as a workspace to temporarily hold active programs and data. If you don't have enough RAM, the computer offloads data to a virtual memory section of the hard drive. Therefore, adding more RAM improves the computer's apparent performance by reducing the number of times it has to swap between RAM and virtual memory.
The computer's motherboard holds RAM in individual sockets. When you add or replace memory modules, the new modules must be the type and speed that matches the chipset.