A ketogenic diet is a diet that causes your body to switch away from primarily using glucose for energy to burning fat for energy. When the ratio of macronutrients (fat/protein/carbohydrates) you eat are ketogenic, over time your body will make the switch, creating ketones from fat and being in a state of ketosis (using ketones for energy). The term ketogenic was originally coined for a diet used to help prevent/reduce seizures in children, though it's a diet that can be very helpful to many types of people.
It can take up to 2 weeks for your body to fully adapt. As you make the switch your body's nutrient requirements will change. The most important difference is that your body will stop retaining water and sodium (salt). This is what causes the rapid weight loss in the first 2 weeks and is also why if you do not add back more sodium into your diet, you may experience headaches, muscle cramps, fatigue, faintness when standing up or constipation. Luckily it's easy to get enough sodium (an extra 2-3g1) to avoid these symptoms, just make sure to salt your food (to taste) and drink a cup of salty broth every day.
A common ketogenic ratio is 1:2:4, e.g. for every 1g of carbohydrate I eat 2g of protein and 4 g fat. Ideally these ratios should be true for both your meals and the day's totals. I find it easier to think in terms of calorie percentages which would be:
75% Fat
18% Protein
8% Carbohydrates
Personally, since I have such a hard time with carbohydrates I use a slightly modified ratio and I restrict the amount of carbohydrates to less than 30g a day.
75% Fat
20% Protein
5% Carbohydrates