what substance should I use to refill a hole in wood?
I'd use epoxy putty. It gets very hard and sticks tenaciously to almost anything. It would be a good idea to dig out the hole a little to make it larger at the bottom so the hard plug of dried epoxy is too big to come out of the hole. If it is IKEA it is probably particle board under veneer and wont offer much strength for the glue to stick, the surface is friable. This is why you should enlarge the hole, to give the glue a better chance of staying in place. Pack the hole with the putty. wait for it to harden overnight. Drill a hole appropriately sized for the fastener and screw it back in gently. Good as its gonna get for fixing IKEA.