Your body will consume its own muscle if it lacks other energy sources. If you provide your body with enough calorie-producing nutrients, you shouldn't be burning muscle.
You can also breakdown muscle if you do long-endurance cardio - the body breaks down muscle for energy then, too. Switching to intervals is one of the best ways to retain muscle mass while getting a good cardio workout (your body won't break down muscle for intervals).