How come when I use an extension cord to run my ac the outlet and the plug of the extension cord gets hot it's on a 15 AMP breaker and the AC states it is pull 12 Amps and there is nothing else running on that breaker
Most AC units say specifically NOT to use extension cords. The reason for overheating is voltage drop caused by the possible smaller gauge of wire and length of the extension cord. An appliance rated at 12amps probably has a 14 or 12 gauge cord. If your extension is a smaller gauge, it may be too small for the current and heating up like an old fashion fuse.
Large appliances like that need extremely burly extension cords which, not surprisingly, cost a lot more money than normal extension cords. Their ends are "fragile" in the sense that it's easy for them to take damage which results in them heating up, at which point the cord needs to be replaced.
But even these cords are not intended (nor legal) for permanent all-summer usage.
Because so many consumers mess this up, the air conditioner manufacturers' lawyers say "Do not use extension cords at all." This means it's all on you to select and watchdog an extension cord which does not have the above problems or any other.
In my experience, extension cord sockets are more troublesome than plugs. When a socket gives out, I'll lop it off and feed the cord (with listed strain relief) into a steel 4" junction box holding the $4 duplex outlets. Mount that on a piece of lumber milled to hold the box and protect the cord exit.
I think you are saying that the heat is being generated at the wall outlet where the male end of the extension cord is plugged in.
If this is so, the heat is generated by high resistance at some of the metal-to-metal contacts inside the outlet device, which is caused by the contact areas being too small.
Problematic metal-to-metal contacts would be at the backstab connectors (if the device is that style) and where the plug prongs meet the slip connectors. Also possible but much less likely are a nicked or nearly broken wire, or an improperly tightened screw connection.
You should replace the outlet device with the most robust one you can afford. Higher quality outlets have more than just thicker metal parts, there are design differences too; e.g. a cheap outlet may contact each plug prong only on one side, while a better device will grab the prong on both sides. Pay special attention to all the connections when replacing the outlet. If it has backstabs, don't use them - use the screw connectors. Examine all the wires for cuts, corrosion, or other damage.
Don't go wild and install a 20A outlet, though. That has got to be some kind of illegal.
Of course also make sure (as others here have said) you are using a proper rated extension cord.
Heavy Duty Indoor 9' Extension Cord (14 gauge)
My experiance is in the UK but I doubt this differs much.
First off how hot is hot? a bit warm is generally ok, too hot to touch is generally a bad sign. Evidence of charring/burning is definately bad.
What tends to happen is you get a poor contact, maybe due to corrosion from age, maybe due to weak springs, maybe due to crap design in the first place. The contacts get very hot which causes further corrosion and can weaken the springs leading to worse contact and more heat.
If a plug/socket pair is overheating I would adise replacing both the plug and the socket. Replace them with good quality parts.
You should also ensure that the cable is thick enough to avoid undue voltage drop. While resistive loads will draw less current at lower voltages motor-driven and electronic loads can draw more.
Personally for high current loads I would make my own extension leads. That way I can get the exact length I need and can chose an appripriate cable size.