Those are referred to as "european" or "cup" hinges and are made to fit into a system of pre-set 5mm holes using compression fittings. (More info. on the plastic fittings is here.) The same sets of holes are intended to also hold shelf supports. The hinges use "oddly-threaded" screws that aren't much good without the plastic inserts.
Euro-hinge showing compression fittings
The picture shows the fittings on the back of a similar hinge. Since it looks like you're missing some pieces of the hinge in the top photo, you'll probably have to pick up a replacement hinge (or hinges if you need to replace both.)
In theory, the "european style" hinges should all be nearly interchangeable so you have a good chance of finding replacements that will fit into the existing holes. Remove the one in the lower picture and take it with you to buy replacements. If you purchase a few varieties from your local BigBox, you'll be able to return ones that don't fit.
If you don't want to do that, you could plug the holes with dowels and glue then insert regular wood screws to hold the hinge in place.
Replacement plastic anchors and the required screws (undoubtedly of various quality levels) are also available from places like Amazon, eBay, etc. Measure carefully, read closely.