A process by which a food, any food, is preserved. In the cases of meats, they are cooked in an oil/rendered fats at temperatures lower than what would be used for deep frying a meat (about 200 degrees Fahrenheit, although duck confit is even lower). As implied by the use of a lower temperature, the meat is cooked for an extended period of time. If you are using a fat or oil that differs from the rendered fats of what you are cooking, then you want a high heat oil so that it does not burn while cooking.
If we’re talking about fruits, then the process only differs in that the fruit (or peels) is cooked in sugar/syrups. The goal is to infuse the fruits and peels with sugar. Sometimes, the end product is referred to as candied.
Historically, the methodology was used to preserve foods. According to this helpful article from Serious Eats, meat confit were cured with various salts and herbs overnight before they were turned into a confit the following day. Truth be told, confit can be stored for an extended period of time. Now, I should not that the cure should be rinsed off before the cooking process begins. Failure to do so could result in a dish that is overly salty. According to Thomas Keller, with the water drawn out, oil will take its place. The goal is to still have a juicy dish.
Now, the modern origins of the technique and term can be traced back to Henriette Davidis’ book Practical Cookbook, published in 1859. I should note you should mention the author’s name when searching up the book in question. Surprisingly enough, there were a lot of practicality focused cookbooks coming out in the 1850s, including a few American cookbooks. However, the technique itself can be traced back to the Middle Ages. This is when the technique entered the cultural consciousness of France, which was very much becoming the culinary center of Europe at that point in time (in certain cirlces).
A cursory look will show that the writer of this book is German; despite this, the term confit comes from the past participle of the French verb confire, which means to preserve. The term itself is not mentioned in the book, but the technique is discussed in great detail.
Now, the last topic I would like to go over is what culinary uses are there for the dish. When preparing a fruit confit, you can end up with a nice, sweet treat in the form of candied fruits. However, the technique still has its place with non-meat, non-fruit foods: preparing a savory condiment. Common applications if going this route is to prepare a garlic or onion confit condiment, a perfect companion for a hearty dinner. Then, of course, you can prepare meat confit if you want said savory dinner.