If the engine has truely "failed" it wouldn't be running. If you can keep an engine running, its probably producing hydraulics and electricity which is always a good thing. Aside from physical damage, there are two things that hurt engines; over temp and lack of oil. You certainly don't want to keep an engine running if its out of oil or has been over temped unless its a dire emergency.
Precautionary shut downs have different outcomes depending on whether or not you have 4 or 2 engines. if you have 4, no sweat, if you have 2 and shut one down, you now have to "land at the nearest airport in time to which you can make a safe landing.".
I'm sure more folks will provide you with more and probably better info to your very broad question.