What determines a player retires depends on many factors. A few of those factors are as follows:
A way to monitor how likely your players are to retire is by going to your teams roster page and clicking on the Show Personal/Financial Data and looking at the Career column. It shows how happy your player currently is. The happier the player is the less likely he is to retire, and vice versa the more unhappy the player is, the more likely he is to retire.