When only proteins and fats are ingested but carbohydrates are excluded, the body (including the brain) burns fats instead of carbohydrates.
For most healthy people, a high-protein diet generally isn't harmful, particularly when followed for a short time. Such diets may help with weight loss by making you feel fuller.