A ketogenic diet is primarily a low-insulin diet. The idea is to eat in such a way as to keep insulin as low as possible for as much of the day as possible. The primary means of doing this is by lowering carbohydrate intake as much as possible, because the glucose that the carbohydrate is made of is what stimulates insulin secretion the most.
Insulin is necessary for the proper functioning of the body, the problem comes only when we have too much of it. So lowering carb intake is primary, but how frequently we eat also has an effect on our insulin level. Eating too frequently will also keep our insulin up, so the strategy is to eat only when hungry, stop eating when we stop being hungry, and not eat until we get hungry again. On a high-carb diet, the insulin that gets produced interferes with the other hormones that regulate our appetite, which makes us hungry all the time. By contrast, on a well-formulated ketogenic diet, people usually find themselves going hours between meals, because their appetite hormones have been restored to proper functioning.
The best way to get into fasting is to let it happen naturally. Most people eating a ketogenic diet to satiety find themselves so satisfied that they soon start to skip meals—because they simply aren’t hungry. From this, an intermittent eating/fasting pattern begins to emerge, almost without our having to think about it. The key is to be sure that when we eat, we eat.
The difference between fasting and restricting calories is that when we eat less, the body slows down to match the amount of food we give it (a famine response), but when we fast, the body simply switches from food to stored reserves, and the metabolism is not affected. This is so that when all the mastodon meat has been eaten, the hunters still have the energy to go out and take down a fresh one for the tribe. The famine response is needed to deal with a whole other set of conditions.