Java does background or parallel processing on threads. See the Sun Concurrency Tutorial for a great intro to threads. The ranch has a whole Thread forum if you want to follow up with questions.
We don't so much "trap" keyboard events as "respond" to them. Are you working in Swing? The Sun Swing Tutorial has a section on event listeners. Again there is a dedicated forum for Swing that may be more helpful.
Are you working on a particular problem? The ranch works really well if you can post some code that almost works. Then we know where you're stuck and what to try next.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
If you're wanting to trap keyboard events destined for another application (i.e. not the Java application that you're writing), I don't think Pure Java can help. Each individual operating system may, or may not, provide hooks, but you'd have to access them with native code and/or external programs.
If that is indeed what you want to do, then I hope it's for legitimate reasons. I can think of plenty of nasty reasons for wanting to get hold of other apps' keystrokes, but not all that many nice ones...
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.