How exactly does gravity affect time? As far I know, gravity curves space-time, but how does it affect the flow of time? Since examples with little explanation would do great.
And, what is a geodesic?
 A: I am only a layman, so this answer is probably highly inaccurate from a physicist viewpoint.
In the General Relativity, there are actually 2 different equations:


*

*How the matter (more exactly, energy density) and its movement affects the curvature of the spacetime. It is the Einstein Field Equations.

*How the matter moves in the curved spacetime. It moves on geodesics (if there are no other, f.e. EM effects). Geodesic means that it moves linearly - but, in this curved coordinates.


Combining the two, the result is, how matter affects the movement of matter. It is like the old Newton's version from the gravity, but it is much more complex. In most cases it is unsolvable analytically. In very simple situations they can be solved with yearlong work of Phd people, being mainly mathematicians and not physicists.
In the GR, the time direction is handled like a fourth "space"-coordinate, i.e. as if we would be in a 4D world where time is the 4th direction. Of course, the time-coordinate has significant differences from the spacelike ones: for example, it is unidirectional and it is like if everything would move with (nearly) $c$ to the time-direction.
There are very popular image everywhere on the net, like this:

This graphical illustration shows a curvature in space coordinates.
What here happens: in the picture, the light moves always linearly. It doesn't change its direction. But, it happens on the curved spacetime, which results its coordinates will convert to other: his original "x" -direction gets a little mix and after moving next ot the Sun, finally it gets out with a little bit of "y"-directional movement as well.
What is not in this picture: a similar change happen also with the time coordinates. As I mentioned earlier, the time coordinate is like if everything would move with nearly $c$ in its direction. This movements converts to a movement on a space coordinate.
The result is that its time will be slower and an external observer will see that the mass accelerates. In the spacetime around a point-like mass, this acceleration (in space) will happen towards to the pointlike mass. But there are also more complex cases (for example, frame dragging).
A: Gravity is dilating the proper time of an object as observed by an observer.
What does this mean exactly?
From the point of view of the object approaching a gravity field (or of the person which might be you) the own clock is running normally. But you may observe that things outside the gravity field (e.g. stars) are moving more and more rapid.
From the point of view of an external observer your clock is moving slower, and you are aging slower (twin paradox).
Quantitatively, the equation of gravitational time dilation (I call it $C$) is: 
$$ C = \frac{d\tau}{dt} = \sqrt{1 - \frac{2GM}{c^2 r}}$$
from the point of view of a far-away observer outside of the gravity field.
The Schwarzschild solution of the field equation is showing the effect of gravitation:
The Schwarzschild metric is
$$ ds^2 = -(1 - \frac{2GM}{c^2 r}) c^2 dt^2 + \frac{1}{1 - \frac{2GM}{c^2 r} } dr^2 + r^2 (d\Theta^2 + sin^2 \Theta d\Phi^2)$$
describing curved spacetime.
We discover that we can insert the above time dilation $C$, and we get:
$$ ds^2 = -c^2 (Cdt)^2 + (\frac{dr }{C})^2 + r^2 (d\Theta^2 + sin^2 \Theta d\Phi^2)$$
Now we compare this equation for curved spacetime with the equation for flat spacetime (Minkowski space)
$$ ds^2 = - c^2 dt^2 + dx^2 + dy^2 + dz^2 $$
which is in radial coordinates
$$ ds^2 = - c^2 dt^2 + dr^2 + r^2 (d\Theta^2 + sin^2 \Theta d\Phi^2)$$
and we see that the only difference between flat and curved spacetime is the time dilation factor $C$.
Now lets take an example: For simplicity we imagine a radial movement at constant velocity, an object approaching radially a gravity source from point $A$ to point $B$. The spatial displacement is $dr$ and the required time is $dt$ (both as observed by a far-away observer. $ds$ is the spacetime interval corresponding to the proper time of the clock of the object (multiplied by speed of light $c$)
We discover that the effects of curved spacetime of gravity are entirely described by time dilation $C$ in flat space instead. On one hand, the time $dt$ is multiplied by the time dilation factor, on the other hand, the displacement $dr$ is divided by time dilation factor. Both the multiplication of time and the division of spatial displacement have an impact on $ds$ of the Schwarzschild metric which corresponds to the clock of the observed object.
So the answer to the question "How does gravity affect time" is that gravity (and curved spacetime)  is  time dilation, and nothing more. Curved spacetime and gravitational time dilation in flat spacetime are two equivalent models for gravity.
