Remove shade, unscrew bulb, and squeeze socket shell at switch to separate shell and cardboard insulator from socket cap. If you plan to reuse socket, do not use screwdriver to pry socket apart. Pull socket out of shell as far as attached wire permits. If this doesn't give you enough wire to work with, push cord up from bottom of lamp for additional slack.
Next, we'll work on removing the socket.