CPU: The CPU attaches directly to a CPU socket on the motherboard located inside the computer. The CPU is inserted into the socket pin-side-down and a small lever helps to secure it. In the pictured example, a large fan sits on top of the CPU to help disperse heat.
Memory: Memory is installed in memory sockets located on the motherboard. These are easily locatable by looking for the small hinges on either side that lock the memory in place.