First, make sure the fluid levels are where they should be. Gears don't run well if they're dry.
Try pulling the PTO implement off, then operating the PTO. If the noise isn't there, then the noise was implement or hookup related (with a caveat...down further in the post).
If the tractor's PTO is still noisy, and the fluid level and type is correct...well you may have a problem with the PTO gearing or brake. Changing the fluid and filter may help, especially if the fluid has been in there for a while.
Now, the caveat: Even if the tractor's PTO is quiet when the PTO is running with no implement, the problem may only occur when there is a load on the PTO. Noisy gears normally whine if the backlash isn't set right. Some gears whine regardless (you might remember this from older pickup trucks...especially in reverse gear). If the rattle comes back, or happens when the PTO is running with no implement, you have something worn or loose in there. That's teardown and rebuild time.
If this is a working tractor (as opposed to residential use like most TBNers), your livelihood depends on it operating. It's tough, but if you wait for the PTO to fail, it could cost you a lot more money.