Firstly, what kind of car are you referring to?
The engine won't have to be pulled to get the pulley and belt back on. It is a fairly simple procedure. Get a service manual for your car if you want to work on it.
The problem sounds like the belt wasn't tensioned properly or the pulley just failed. Did you hear any noise that would have suggested the belt came off?