One of the biggest misconceptions about muscle and fat is that they are interchangeable. It is not uncommon to hear women talking about how they are afraid to lift weights because they fear of their level of fat will just instantly change into solid muscle. In fact, many think they should hold off lifting any weights until they have a lower level of fat on their body for just this reason. On the other side, many older generations will wonder why you bother to lift weights at all because as you get older, your muscle will just turn into fat.
Cannot physically happen.
No matter what you read, fat and muscle cannot be replaced by each other. However you DO need muscle in order to lose fat. Muscle helps keep your metabolism burning high, so the more muscle you have, the higher your metabolism will be. This is important because it means your metabolism burns more energy and thus increases your TDEE (more food!!) On the flip side, the higher your metabolism is, the higher your caloric intake will be in a cut phase which will allow you to lose fat.
If you are coming from a restrictive dieting background, be aware that you need a muscle building phase FIRST before you can tackle a fat loss phase. Most dieters are coming from a muscle deficit, which means there is not enough muscle to accomplish the very goal you're chasing. Muscle building and fat loss are two very different phases and cannot be done together. The process of doing either goal, are complete opposites of each other. Muscle requires more calories (TDEE or higher) whereas fat loss requires less calories (TDEE – 5-15%).
You cannot turn fat into muscle, but you do need muscle in order to lose fat.