I was putting together my home treadmill and most of the bolts screwed into the frame and tightened nicely, but a couple of them will tighten somewhat and then suddenly become loose again when you try to further tighten them. Obviously the frame's thread is damaged; is there some way to still get these bolts to tighten without buying a whole new frame (unfortunately the bolt hole is drilled directly into the frame and is not a separate component)?
Remove the bolts and inspect the threads of both the bolt and the tapped (threaded) hole in the frame.
You have three possibilities here:
Either A) the frame threads are damaged, B) the bolt threads are damaged, or C) both threads are damaged.
If A) or C), you're unfortunately out of luck without drilling and tapping a new hole as Tyler has said (this won't work if the frame is plastic with threaded inserts). This is the most likely because your bolts are probably steel and your frame is probably aluminum, or plastic with inserts.
If B), take the bolts to a hardware store (Ace Hardware usually has a great selection of individual bolts and are usually more helpful, but a place like Home Depot or Lowe's will also work) and find new ones that match. Then take care not to over-tighten them!
General rule: if there isn't a torque specification on a bolt, run it down "snug" (until you start to feel resistance, then give it another quarter to half turn). "Snug" is subjective but it should get you pretty close. And it'll help when assembling cheaply-made parts.
The thread is ruined. You would have to drill a larger hole and re-tap it to fix it. Plus you would need a larger bolt to fit in the enlarged hole.
If it is not convenient to return the unit, are you really going to go and buy a tap and tap handle, and learn to use it?? NO. Use an appropriately sized self-tapping screw and be done with it.
Note: In self-tapping screws #14 (1/4" dia.) may be the largest you will find at a "big-box" store (although there are larger sizes out there, often called boiler plugs).
If it is a large dia. bolt then you may need to drill and tap; another alternative may be to drill all the way through to the other side and "through bolt" it with a longer nut and bolt.