Does muscle turn to fat if you don't exercise?

No, but muscles do shrink when they are not used as much. And since people often keep eating the same amount, even when they aren't exercising as much, those extra calories get deposited as more fat throughout the body.