Starting at the top, gently raise the keyboard enough to remove it from the socket.
Potential for device damage: DO NOT pull out the keyboard after it's out of its socket. The keyboard is connected to the hard drive through a data cable and removing forcefully could damage the cable and laptop.