Both.
ALWAYS keep your airfilter on and glo plug in when cleaning the outside. You dont want to risk ANY particles of dirt or stones in the engine.
Cleaning the inside can be a bit intimmidating depending on how far down you want to clean it. Typically, cleaning the carb and running wd-40 through the intake and out the exhaust port is good regular maintenance. While every couple of gallons its good to take the cooling head and backplate off and not only inspect the piston and sleeve, but the conrod itself.