It depends on: the type of implant (electrically active or not), what the implant is made of, and also how long since it was inserted.
If there is no electrical activity associated with the implant and it is non-ferromagnetic (e.g., elgiloy, phynox, MP35N, titanium, titanium alloy, nitinol, tantalum, etc.), the patient can be scanned immediately after implantation. If the implant is weakly magnetic then you should wait six to eight weeks for it to be held firmly in the tissue. (If there is any concern over the ability of the tissue to hold the implant however, don't scan.)
These include most orthopaedic implants (plates, screws, nails and rods), some neurosurgical implants (shunts, drains and plates), dental implants, and other surgical implants (haemostatic clips, wires and drains). The type, location and composition of the implant must be taken into consideration by the clinician responsible, on a case by case basis. Certain contraindicational implants should be noted:
Some intra-cranial vascular clips are absolute contraindications in MR imaging. Clip motion may damage the vessel, resulting in haemorrhage, ischaemia or death. At least one fatality has occurred from the existence of a vascular clip in a patient undergoing an MRI examination.
Careful screening of heart valves in patients is advised. Although most devices are not significantly deflected by the field (compared with normal pulsatile cardiac motion), there may be valves whose integrity could be compromised.
Certain otologic implants are a definite contraindication for MRI, and will be magnetically or electronically activated.
Some ocular implants could injure the eye due to components made out of a ferromagnetic form of stainless steel.
Other implanted materials and devices include implanted neural stimulators, bone growth stimulators, infusion pumps, artificial anus with magnetic enclosure (anus praeter), and transdermal adhesive dressing.
Pacemakers are a contraindication, and are discussed elsewhere.
Shellock's List of tested devices is a useful aid to your decision after determining the exact nature of the implant from patient notes. Note that some implants have only been tested at 1.5 T.
As always, if in ANY doubt, don't scan.