Both. I do a layer on the block then stick the gasket on there so it sticks and you can line it up nice and easy. Then a layer on the pan and bolt it up. I do a real thin layer so that you dont have a bunch squeeze out into the oil pan.
dont forget the thread locker on those upper oil pan bolts that are inside the pan.