If a lamp flickers or doesn't come on even after you've changed the bulb, check the cord (especially near the plug) for breakage. If you see no damage, unplug the lamp and examine the socket. The problem may be in the wire connections to the socket.
A metal socket is the most common. Others are made of plastic or porcelain and attach to the lamp or light fixture with screws or a nut and bolt. Take the old socket to a hardware store or home center for a replacement that fits.
About 20 minutes (not including shopping) to test and replace a socket
Screwdriver, continuity tester, perhaps strippers and lineman's pliers
Fastening wire to a terminal; testing for voltage
Unplug the lamp
Replacement socket, switch