Yes and no. No they don't discharge people for failing the APFT, they give them unlimited chances and will modify tests so they "pass." On the other hand people are discharged for failing the APFT but that is usually because there are other circumstances involved, it's like sending a crime boss to jail for tax evasion sort of thing, there are other things involved but this is the only thing that will stick and wont raise eyebrows... you cant kick somone out of the army for being stupid, that is what I am getting at. While I was in Infantry school there was one person kicked out for failing the APFT but he was a complete and utter screw up, in fact there were about 10 guys who failed the APFT but where retested until they passed. As a last ditch effort if a person is lacking they will sent them to a Fitness training unit (FTU) we called them Fat Tired and Ugly, they will get reduced low carb meals and do nothing but exercise all day until they get back up to par with everyone else.
Frenchy is right, they flag you and you cannot get promoted or recieve awards, I also believe you cannot be deployed with your current unit. My experience comes from initial entry, the first few months of being in the service, none of us really got medals or promotions so we didnt have to worry about that kind of stuff at that time.