Shimano V-Brake Loose cable at handle
I think you are saying that the brake housing has come out of the lever. It can simply be re-inserted back into the lever, however, if the cable was slack enough to allow this to happen in the first place, the brake needs to be adjusted properly.