How long should you work out for?
A great question that is often asked and quite often misunderstood - How long should I train for?
This depends on where you're at in your fitness journey. You can definitely overdo it, so a key thing to remember is be productive not busy. What does this mean?
It means that you need a plan walking into the gym. Do you need to be in there for 2 hrs? probably not and if you are, there is a high chance you are just being busy and not productive.
How can we be productive? Easy!
Understand what your goals are and understand what will aid you in being more effective. As for how long you should be exercising, at least an 30-40 minimum is recommended however anything over 90 minutes I would consider counterproductive. The time does depend on what you'd like to do, but you shouldn't be starting out with long hours at the gym.
Stick to at least three days a week of activity and as you feel like you are becoming more confident and enthusiastic increase the frequency in which you train.