The short answer is that it depends. In general, however, you can expect water to cause damage to your foundation within 3-6 months if the leak or drainage problem is not fixed. Of course, this is just a general estimate; in some cases, water damage can occur much more quickly.
The amount of time it takes for water to damage your foundation will depend on the type of foundation you have, such as a traditional slab on grade vs. pier and beam, and the severity of the leak.
Other factors include the amount of hydrostatic pressure put on the foundation by standing water and of course the climate. Larger leaks will cause damage faster. Water damage may also occur more quickly after heavy rain compared to the dry season.