Caffeine boosts your energy and mood and makes you more alert. That can sometimes be helpful, especially in the morning or when you’re trying to work. Though your body doesn’t store it, caffeine can affect you for up to 6 hours after you swallow it.

While caffeine usually isn’t dangerous in moderation, too much can negatively affect your health. Most adults can safely consume about 400 milligrams of caffeine a day, about what you’d get by drinking four to five average-sized cups of coffee.
Effects of Caffeine
There is a lot of variation in how much caffeine people can tolerate. Most people feel the maximum effect of caffeine about an hour after consumption. Signs that you’ve had too much include the general symptoms: Shakiness, agitation, trouble sleeping, headaches, dizziness, racing heart, dehydration.
Increased Alertness: It blocks the effects of a chemical called adenosine, which makes you feel sleepy. This makes you feel more alert and energetic.

Sleep Cycle Changes: Levels of the hormone melatonin, which your body needs to fall asleep, decrease in the presence of caffeine.
Feelings of Anxiety: The other downside is that caffeine may make you feel jittery or anxious, especially if you take in too much.

Increased Dopamine Levels: It boosts the flow of dopamine, a brain chemical that makes you feel happy and engaged with the world around you.
Positive Impact on Memory and Cognition: Caffeine may even help you to think and remember better. Also, older people who consume caffeine may be less likely to develop Alzheimer’s disease and other age-related memory issues.

Negative Effects for Those with Pre-Existing Heart Conditions: Less concentrated forms of caffeine may also temporarily increase your heart rate if you take in too much. This is a concern if you have pre-existing heart problems.

Affects Digestion and Urination: Caffeine increases the amount of acid that your stomach produces. Caffeine worsens your symptoms of GERD. Caffeine is also a diuretic, which means that it encourages your body to urinate more.
On the whole, caffeine is safe for most people, at least up to the amount you’d get from four cups of brewed coffee a day.
Sources: https://www.webmd.com/diet/how-caffeine-affects-your-body?icd=mm-hlh#3