There is a common misconception that when someone stops exercising, their muscles turn into fat.
Fats and muscles are contain many different type of cells that serve many different functions. Skeletal muscles increase in size when people exercise. This happens not because of an increase in the number of muscle cells, but the increase in the size of each muscle cell. When a person stops exercising, their muscle cells are simply shrinking, not disappearing or turning into fat cells.
Muscle cells take a lot of energy to maintain. Thus, people who exercise regularly have a tendency to consume more food than other people who maintain a healthy weight without exercise. When people stop working out, but maintain a similar calorie intake, they tend to get fat because the body no longer requires such a high intake without constant exercise. The body does not have a way to burn those extra calories, and the result is more fat deposits in the body.
So when someone stops exercising and gets fat, the muscles are not turning into fat. In many cases, the increase in fat mass is a result of not adjusting your nutritional intake to match your energy usage.