The key is to drink throughout the day, monitoring your level of hydration by how often you need to urinate and the color of your urine. Urinating around seven times a day is optimal and it should appear clear to straw colored. The darker the color the more dehydrated you are.
How much water you need depends on how much one sweats. A good rule to go by is to drink when u are thirsty and to take several sips during you work out. Sport drinks with electrolytes are usually not needed unless you are performing vigorous activities and more than hour. You may also want to dilute them.
One way to tell how much water you need to drink post-workout is to weigh yourself before and after and see how much you lost. For every pound you lost through sweat one should drink 20-24 ounces of fluid throughout the rest of the day.