For holes that are the right shape, but worn, add some wood glue, and screw it back in. For a little extra friction, stick a little piece of one of those plastic coffee stirs in there too.
If chunks of mdf have broken off with your screw, you'll need to cut some more away, and glue a replacement block in place. Maybe you can chisel a section out, like a half blind dovetail.
It's important to use a clamp when gluing pieces together. Then lightly sand (just to rough the surface), clean, and prime, before repainting.