A type of clarified butter. There are recipes for the production of ghee, but most of these recipes can be generalized as a process of heating the butter until the solidified milk solids float to the top of the melted butter. After removing these milk solids from the mixture using any of a variety of methods, such as straining, what you have left is ghee. This process should also remove most if not all the water. I will say, this is an oversimplification of the process and the decisions made to determine the flavor profile of the ghee in question.
Due to the removal of the milk solids during the preparation process, ghee can be stored at room temperature. In addition, compared to butter, ghee has a high smoking point and (generally), a more nutty flavor. A staple of Indian cooking, popular foods and dishes to include ghee include tadka and with naan among others. Fun fact: according to a paper published by Lodh et. al in 2018, approximately 30-34% of butter in India is converted into ghee.
Now, another item I should add is how the use of ghee has gained popularity in the western tradition. The previous paragraph touches on it, but one of the reasons is pretty straightforward: Indian cuisine has become substantially more popular. Additionally, due to its high smoking point, it can be used as a high heat oil for dishes that require it. Alternatively, let’s say you want to use butter but also want to impart a nutty flavor, ghee is perfect. It’s more shelf stable, so it can be a perfect item in homes where that is a concern (electrically or spatially speaking). Given the relatively high prevalence of lactose intolerance, the use of ghee provides a great alternative to the use of recipes that require butter since most milk fats, lactose, and proteins such as casein have been removed. For the same reason, ghee is also a popular item used by those adhering to diets such as the Paleo diet.
Logistically speaking, another way that it acts as a nice substitute for butter in recipes is that the substitution ratio is 1:1. So, if you need to alter a recipe to use ghee, you do not have to change the measurements necessarily. All that would change is the ingredient used.
For more interesting rabbit holes to go down, I highly recommend looking up and learning about the traditional methods of ghee preparation. Personally, I think they are quite interesting, but I do not have enough to go into them here.