This is a common problem in modern ranges and cooktops with removable surface elements.
The tips of the plug-in element make contact with power from the range in a receptacle located beneath the cooktop. Inside these receptacles are contacts that can weaken or wear out over time. When this occurs, the electricity does not make continuous contact with the element and causes intermittent heating. This poor contact also causes heat that melts the receptacle block and damages the element contacts.
The first thing you should do is inspect the tips of the plug-in element, they should be silver in color. If they are blackened or pitted, that is a sign of the problem I described. The terminal block that the burner plugs into needs to be replaced.
Depending on how bad the damage is to the element, it may be necessary to replace the element also. If only slightly discolored or burnt, you may be able to clean the element tips with steel wool or fine sand paper. Be warned however, the tips are plated with a thin layer of material to enhance conductivity. If you sand too hard, you will remove this coating and make the element unusable.
The replacement terminal blocks (element receptacles) will either come with long wiring attached so that you can feed it directly to the switch that controls the element or with short wires and wire nuts to allow you to join it to the existing wiring.
If you decide to replace only the receptacle and not the element, keep an eye on that element in the future. If the same situation recurs, you'll need to replace both the element and the terminal block. Once a terminal block has been used with a bad element, it should be replaced and NOT used with the new element or damage to that new element can result.