You would need to:
1) Plug your computer into AC power;
2) Plug in the monitor and make it's been recognized;
3) Plug in an external keyboard and mouse (they can be wireless/Bluetooth);
4) Close your computer's lid until it sleeps;
5) Use your external keyboard or mouse to wake the computer up;
6) You should now be able to use your computer powering just the external monitor.
Steps 1-3 can be completed in any order; just make sure you have an external input device to wake the machine up and it needs to be plugged into an external power supply for clamshell mode to work.
When you computer is running in clamshell mode, you can choose to open the lid on the computer and that should allow you to disconnect the external keyboard and mouse should you choose to do so; it will not enable the built-in display unless you go into 'System Preferences'>'Displays' and select 'Detect Displays'.