If a four engine jet aircraft has an engine failure, it may be more economical to carry out a 3 engine ferry flight to a maintenance base than to freight another engine, parts, tools (some very large), engineers etc to the aircraft location.
Provided that a list of procedures is observed, it is perfectly legal to take off and fly the aircraft on three engines.
As has been stated, it is highly undesirable to have the failed engine rotate in flight. This is prevented by 'spragging', that is: by some means stopping the fan from rotating. I've seen it done by jamming some wooden staves between the blades and tying them together with wire. Seat belt extensions seem as good a means as any although, personally, I'd like to see the buckles wired closed.
Before anyone asks: No passengers. Even as a company FO with wife, we were refused travel on a VC10 3E ferry many years ago.