You can do either. I usually put the airlock in the lid of my bucket because it has the hole for an airlock and just set it on the top for a day or so and then snap it down tight when the fermentation has taken off.
You don't really even need a lid on it and can put a piece of cheese cloth over it with a rubber band if you want. My 10 gallon fermenter does not have a hole for an airlock and I just pop the lid on. It is not an airtight fit so the gasses can escape around the lid.
You really just want to keep the bugs and stray objects like cat hair or the such out of the must at this stage. The yeast need oxygen to get going but even if the lid is snapped on tight, there is plenty of oxygen for the yeast to thrive.