Much of the visible plumbing under a sink can be replaced and repaired even by a novice. The key is the right tools. A do-it-yourself plumber needs several type of wrenches for tightening and holding different connectors. The space under a sink is limited and hard to get into. It can take a lot of patience and the flexibility of a contortionist to get at some of the plumbing parts and have enough leverage to tighten or release them. The locknut is usually used in basin drain installation. There will be one or perhaps two locknuts to remove if you are reinstalling any of the attached plumbing.
Put on eye protection before trying to remove a locknut. In its simplest state the nut can be removed by putting a sink drain wrench across the two holes in the upper drain, or needle nosed pliers or cross two screwdrivers in the holes to make a brace. Under the sink use channel lock pliers to unscrew the locknut while holding the top of the drain from above. This really requires another pair of hands.
Tap the edge of the locknut if it is resisting removal. Tap it in the direction it unscrews to break any seal from corrosion or plumbers putty. You can also try tightening the locknut, which achieves the same thing. It will break any obstruction on the threads of the nut.
Heat up the threads on the locknut if you still can't get it off. The heat will release any plumber's putty and may change the structure of the metal just enough. Use needle nosed and channel lock pliers to loosen the nut while it is warm.
Scrub the threads on a stubborn locknut where it joins the pipe. The abrasion of a wire brush will remove rust and corrosion. Wipe off any loosened debris. Then spray or wipe on liquid lubricant and allow it to sit for five minutes. Apply some more lubricant and then try to turn the locknut.
Cut off the locknut. This is absolutely a last resort but you don't want to bend or break the pipes under the sink, so it is extremely effective. Use a hacksaw to cut the nut off even with the bottom of the sink. It may have been permanently fastened with silicone or even epoxy in a misguided attempt to prevent leaks which will make it impossible to remove any other way.