You definitely don't want to just pull the plug this can cause problems with the SD Card and filesystem.
From the commandline or a terminal window you can enter the follwoing to do a clean shutdown:
sudo shutdown -h now
or from the LXDE GUI
click the shutdown button (red power button) in the menu bar at the bottom right corner of the screen. then click shutdown.
Once it says "system halted" you can remove the power cord if needed