Intermittent fasting is an eating pattern where you cycle between periods of eating and fasting.
It does not say anything about which foods to eat, but rather when you should eat them.
Doing IF is not just for losing weight, but also for better metabolism, improving medical conditions like diabetes, more optimal brain activity, a stronger immune system, and basically living longer[2, 3, 4].
While it focuses more on when to eat, rather than what, many people still ask this big question:
Can you drink coffee or tea while intermittent fasting?
Caffeine while fasting: what the experts say
According to Dr. Akil Palanisamy, physician and author of The Paleovedic Diet:
"Autophagy is the self-cleaning process by which the body's cells break down and recycle damaged proteins and components. This is activated by intermittent fasting, but anything other than water (even black coffee) disrupts it to some extent.” 
Dr. Rhonda Patrick, a Ph.D in biomedical science and expert on nutritional health, seems to agree in this interview with Joe Rogan. She says that drinking black coffee, green tea and vitamin supplements break the fast.
On the other hand, some experts agree in saying that caffeine is okay while fasting, but only to a certain extent:
Steve Kamb, fitness instructor, publisher, and writer best known for promoting health and wellness at NerdFitness.com, says it’s OK to drink any zero-calorie beverages during an intermittent fasting routine. 
“Zero-calorie beverages are okay. As previously stated, I drink green tea in the morning for my caffeine kick while writing. If you want to drink water, black coffee, or tea during your fasting period, that’s okay. Remember, don’t overthink it – keep things simple! Track your results, listen to your body.”
Dr. Josh Axe, D.N.M., C.N.S., D.C., of DrAxe.com and best-selling author of “Eat Dirt” thinks that “tea and coffee are fine to consume as long as you don't add any milk or sweeteners.” He explains on his blog:
"If you’re on a time-restricted fast and you’re in no-eating hours, it’s best to stick to no- or low-calorie drinks like water, coffee (with no milk) and tea. If you’re on an alternate day diet or something similar, even during low calorie hours, you can technically drink whatever you’d like — but remember, this will count against your calories. Would you rather spend 100 calories on an apple or a glass of milk? It’s your call.” 
Fasting for blood work. Mayo Clinic Medical Laboratories allows drinking coffee up to two hours before some tests: 
Is having black coffee fasting? Doctors keep telling patients it is all right to have black coffee before fasting blood work (fasting sugar, fasting lipid panel).
It depends to some extent on what test is being performed, but for many tests that require fasting, intake of non-carbohydrate containing liquids a few hours before testing will not impact results. We have worked here to make 1 standard definition of “fasting” that encompasses most test requirements. We allow clear liquids (water, black coffee) up until 2 hours before a test or procedure. The definition of fasting should be clarified for all procedures in your institution if possible.
Does coffee make intermittent fasting easier?
Good news - the answer is a resounding YES!!! Here are four (4) reasons why you should NOT ditch your coffee just yet:
According to Livestrong, caffeine can help you lose your appetite: 
In a study published in "Clinical Nutrition" in January 2009, 27 participants consumed capsaicin, which occurs naturally in hot peppers; green tea, which contains caffeine; sweet peppers; capsaicin plus green tea; or a placebo on 10 separate days. Researchers then analyzed the participants' appetite, food intake, body weight and heart rate and found that green tea consumed with or without capsaicin led to increased satiation, or fullness, and reduced calorie intake.
Erectile dysfunction. In combination, those are two of the ugliest words known to man. But can caffeine help you get it up?
Science hasn't found the definitive answer to this question, but one study concluded that fewer men who consume caffeine have problems performing. The study said:
Caffeine intake reduced the odds of prevalent ED, especially an intake equivalent to approximately 2-3 daily cups of coffee (170-375 mg/day). This reduction was also observed among overweight/obese and hypertensive, but not among diabetic men. Yet, these associations are warranted to be investigated in prospective studies