There are no gaskets. There is an oring on the distributor shaft and there is an oring between the distributor housing and the back of the head.
To replace the orings....
Turn the engine over by hand, until the mark/notch on the crank pulley lines up with the "0" mark on the timing belt cover.
Make a mark on both the distributor housing and the distributor, to ensure you can position it back exactly where it was before (or if you have a timing light, you can check/reset the timing, once you reinstall the distributor).
Remove the distributor cap and note where the rotor is positioned (it should be pointing to where either the #1 or #4 tower was on the distributor cap).
Remove the bolt that holds the distributor in the housing.
Remove the distributor. You will now see the oring on the distributor shaft.
To replace the housing oring (this is usually the one that leaks and allows oil to run down the back of the engine and onto the tranny bellhousing), take the 3 bolts out that hold the housing on the back of the head. Pull the housing straight off the back of the head. You will then see the oring that is on the housing (it may be stuck to the back of the head, if you don't see it on the housing).
Clean all the surfaces, lightly oil the new orings with clean engine oil, put the orings in place, put the housing back on the rear of the head. Tighten the bolts (don't overtighten them, they will break).
Put an ounce or so of oil down the hole in the housing where the distributor fits (this is to make sure the distributor gear and cam gear has lube on them). Make sure there is some oil on the walls of the housing, so the oring will slide in smoothly and not get damaged.
Put the distributor back in, making sure the rotor is pointing to exactly where it was before, with the distributor fully seated and that the marks line up on the housing and distributor (if you didn't mark the distributor before you removed it, just position it in the middle of its adjustment range...that will get it close enough that you can start the engine and get it up to operating temp, then you can adjust the timing using a timing light).
Put the cap back on.
Once the timing is set, tighten the distributor bolt.
Instead of oiling the oring on the distributor housing, some people put a thin layer of RTV silicone on the back of the head, where the oring seals against, to help the oring seal. Your choice on how you want to do it (I do RTV silicone method).