How do I detach the wires from this lamp ceiling socket?
One sure option is to cut the wires off immediately adjacent to the socket. Then you strip off a short bit of additional insulation on each wire to expose the electrical conductor inside.

It looks like that socket used to also provide a hook from which the cordage or swag chain of the old lamp would hang. You will have to carefully evaluate how the new lamp is secured. If it is a hanging unit you cannot simply let it hang from the electrical connections. If the lamp is a ceiling mounted fixture then make sure to hang it in a Code compliant way so that it is safe and does not put a strain on the electrical connections.