Windows XP Help [Start > Help] includes tools for troubleshooting many problems. (Click the Index tab in Help, and type trouble.) Select the troubleshooter that pertains to your problem and follow the instructions.
"PC Guide" has a comprehensive tutorial on PC trouble-shooting and repair. (Use their left-hand column to navigate when you get there.) You can go to About.com and search for the keyword "troubleshoot" to find specific troubleshooting information. You could also use a Google search to find more troubleshooting techniques.
When something just stops working, or works wrong it's often because Windows lost track of something. Close and reopen the program you're using. If that doesn't clear up the problem, try restarting (rebooting) your computer.
Some recoverable problems require a "hard reboot" though. For example, modem problems. That's because a soft reboot skips the very first boot steps where hardware details for the mouse, keyboard, modem, memory, etc., are loaded into memory. To force a hard reboot, shut the computer down (and for some laptops, remove the battery for 30 seconds or so).
In a few cases you must physically turn off all power to get a process that is lost to back on track. There may be a power switch on the back of your desktop computer, or you can pull the plug from the wall socket.
You're almost certainly not the first person to run into the computer problem you face. That means the problem has been solved before, and likely captured in a "knowledge base"--either an actual database or an organized help forum--that can provide the solution you need. Windows Support Centers and Knowledge Base (look for the search box in the left column) are an excellent places to start. Find more places to get answers at the Online Help page.
"Google" for the answer to error messages. Just go to Google.com and plug in the error code. If no code is given, you can enter the most relevant keywords, or paste the entire error message in the search box.
Try Microsoft's Windows 9x Error Message Resource Center or Windows XP Resource Center for answers to error messages.
If there's a term in the error message that you don't understand, look up the definition at techtarget.com.
Crashing or lockup is easily the most vexing Windows 98 problem there is. Windows XP is much less prone to crash. A common cause for crashes is too many programs--many of them hidden--running at the same time. Go to the Crash page to learn what to try.