Reminds me how much I hate HP computers
Started out in '99 with an HP Pavilion running windows98SE. Can't even remember how many times I had to reformat that machine in the 3 or 4 years I owned it. My second machine, a refurbed HP running milenium had a power supply failure within a year, and that new supply lasted maybe another 6mos.....and not long after I put yet another SP in it, the hard drive grenaded and I lost probably 1,000 photos of my daughter from about age 3 to about age 6.
So as others have said, get a memory stick that'll hopefully work with 98, and save as much as you can. Then get a good used Dell of Craigslist or ebay. They're bulletproof.
Couple things you can try since the machine is so old.
1) Unplug everthing from the back, remove the 2 screws at the rear and slide the side panel off rearward. It'll be full of dust in there so clean it out.........best way is with compressed air, but hold your breath and don't blast any cooling fan blades that you aren't holding firmly with your fingers. A blast of air on the cooling fan(s) can make them spin so fast that they grenade and you could get cut pretty bad. Once you have all the dust blown out... and blow out the power supply really good, unplug all of the connectors for every single thing that you can find, one at a time, and plug them back in. This includes the memory sticks, and all the ribbon wires, and all the circuit boards, and any little jumpers on the mother board.
2) smell the power supply. If it smells like it's burned up, it is. Most of these HPs use a special micro sized power supply that is waaaaaaaay undersized. You can buy higher output versions on ebay and they are dirt cheap. MicroATX is the size. A failing power supply is common, and it'll give major boot up problems as well as other running problems as things are starved for wattage and then function poorly causing the machine to lock up.
3) Test start it. Leave the side panel off, plug all your connectors back into the back and then fire it up and see what happens. You can make it boot into safe mode by repeatedly pressing F5 key when you see the HP blue screen. From safe mode, you can make the machine go back in time and reboot from a previously saved "good" boot up......called "System Restore." You sellect a previous date from a calendar and tell it to reboot from that date. Many times this will restore the machine to working condition.
4) If you get it fired up good enough to start saving important documents and photos....START SAVING THEM!! You may not get another chance.
But honestly once you save your info, it's time to move on to a Dell running XP and get on with your life. I think I paid $150 for this one I use, and then bought a twin for my daughter for $100. We've had no problems with either and I think we're on our 3rd year with them.