The pin locks the PTO shaft of the implement to the PTO output shaft of the tractor so the shaft doesn't come off when you are using the implement. If you look into the end of the input shaft and push the pin, you can see that it is not round all the way. There is a chunk missing when you push it in. On the PTO output shaft of the tractor, you should see a groove half way up the shaft and all the way around. The pin aligns in that groove when it is in the out position to lock the shaft to the tractor. Push the pin in, put the shaft onto the tractor as far as it will go, release the pin, pull the shaft back and the pin should pop back when it hits that groove. That's how you know the implement is properly attached.
As far as the hole in the shaft, I'm not totally sure what it is for. I suspect it allows attachment of a pulley to run a stationary piece of equipment using a belt (buzzsaw) from years gone by. I have seen equipment where the pin was missing and a bolt was put through the PTO and implement to attach it. I don't recommend it.