What is this thing that looks like a light socket but isn't
It looks like the outer shell broke off that the lamp screws into. These are simple 2 wire fixtures with a pull chain on off switch. You can still purchase ceramic ones just like the one you have and there are some plastic ones that can be found for less than 5$. Make sure to turn the power off Remove the 2 screws and lower the fixture. Some of these have screws that the wires are attached to some pig tails. Make sure to note the wires they should be white on the shell and black on the switch and then to the center conductor. A real easy fix.