This lamp is totally a fire hazard, but it's marble, so it's a piece of damn art and worth fixing. You'll need a lamp rewiring kit. I like this one from Home Depot.
First things first: Use wire cutters to separate the old cord from the old socket. Pull the old cord out through the base.
Feed the new cord through the base of the lamp.
Push the cord all the way up through the base until it comes out the top. You're starting to feel like an electrician now, aren't you? Just wait. It gets better.
If you're going to use a harp with your lamp, put the harp base on now. The Home Depot kit comes with a new one, but if you want to retain some of that vintage-y appeal, you can use the old one, too. On top of that, screw in the new socket cap.
Separate the two ends of the cord and tie them in an underwriters knot. You're basically making a pretzel. But if you're not familiar with pretzels because you lead the saddest existence ever, here's a YouTube video.
After you've tied your knot, pull it tight and snuggle it into the bottom of the socket cap. The knot will keep your cord from getting pulled back down through the base.
This next part is important, so make sure you read the instructions that came with your kit, just in case they differ from the genius tips I'm imparting on you here. You need to identify which wire is neutral, and which one is hot. See how the two prongs coming out of the plug are different sizes? The skinnier prong goes with the hot wire, and the wider prong goes with the neutral wire. Check out the cord to look for distinguishing features. In this case, the hot wire is the side with the writing, and the neutral wire has raised ribs.
The scary-looking thing in the photo below is the socket. In addition to the switch, it has two screw terminals. The gold screw goes with the hot wire, and the silver screw goes with the neutral wire.
To attach the cord to the socket, you just wrap the exposed part of each wire around the screw, then tighten it with a screwdriver.
The socket shell and insulating sleeve should already be attached to each other, so you just need to put them on top of the socket. You'll just kind of wiggle it into place.
Once you've attached the harp and screwed in a lightbulb, you have the option of picking out a fancy new shade that'll make your lamp look less like it came from your grandmother's basement.