Disclaimer:
I am not a doctor
For pasteurized milk (refuse all substitutes), 2 or 3 days is normal, a week is uncommon, three weeks is possible (I've tried it).
When milk goes bad it's pretty easy to recognise. Several different things may happen to it: it may thicken (very common) and turn sour (just as common); one may occur without the other. Thickening by itself doesn't affect the taste at all, but milk turned sour is usually disgusting (acidity and taste vary widely).
Our buttermilk (karnemelk) undergoes both processes in a controlled way, resulting in a much better taste, although opinions vary.
Quite unusual is a fermentation process, where the milk will assume a sparkling taste; controlling this process leads to Norwegian kulturmelk, one of my favourite drinks.
As far as your health is concerned: these processes serve as an early warning system: they affect the milk in appearance or taste, but they do not make it unhealthy; milk turned sour is actually better protected against genuine dangers, such as moulds. If milk hasn't turned thick or sour, you can be fairly sure it's safe to drink it, and I always do.
A good indicator is hot and/or acid fluids (tea with lemon); milk will decompose much sooner in them, they
can tell you if milk is turning bad before your own taste buds can. If the fluid is sour enough, even perfectly fresh milk will decompose, so use this test with caution.
PS Long after writing the above, I was told that the above statements are false, and that milk can go bad in ways that are absolutely disastrous to one's health, without any clear indication in looks, smell or taste. I have not yet attempted to seek independent verification.