Most simple hernia operations are performed as day surgery, and therefore you will probably go home on the same or following day that the operation is performed. More complex or recurrent hernia operations may require you to spend multiple days in the hospital after surgery.
Before surgery, you will be advised to lose weight, and treat underlying conditions that cause excessive straining (eg constipation, benign prostatic hypertrophy). This would help in reducing the risk of recurrence of the ventral hernia after surgery.