This is not a good situation, but fortunately usually resolves on it's own after a few days. Sometimes the plastic tube going into the vein is not properly secured and slides in and out a bit, introducing bacteria. Other times the line is left in for too long a period. The most common cause, however, is a caustic antibiotic. It is not malpractice, but a common complication that happens in the best facilities. Sort of the nature of the beast. The important thing is to get the IV line out immediately and allow the arm to recover.
I suppose you mean an intraveous line. Certain medications, particularly intravenous Vancomycin, cause such pain. This (and other) mediations are extremely irritating to the tissues. One of the problems is the drip was run too fast. Commonly the pharmacy attachment states "75 minutes" while the drip should really be run in at 120 minutes. he intravenous sites are rotated (left arm, then right arm) and an antihistamine is often prescribed. This can be very serious and should be brought to the attention of your physician, however the problem generally goes away. Vancomycin is often prescribed for osteomyelitis. The Journal of Infectious diseases Jan 2011, suggests high-dose oral antibiotics are equally as effective as parenteral administration. This can also happen when an infection develops at the site of the intravenous trochar, or when the site is used for too long a period or has infiltrated. The drill is to remove the intravenous line immediately, and watch for other symptoms elsewhere on the skin. Keep your physician posted. This problem should ordinarily resolve within three days.