How likely is it for icd or defibrillator to become infected?

Not very likely. The most likely time of infection of the device is during insertion or subsequent replacement. Due to the wires in the heart occasionally you can get infection in the heart (endocarditis) due to bacterial that somehow find their way into the blood stream and then can infect the wires of the device. Overall the risk is low but when it happens it is a serious condition that requires prompt attention.
Rare. Infections such as these are fortunately very rare. The procedure is performed in an operating room under sterile conditions. The device might have to removed if bacterial infection develops.