Put simply, a geodesic is a straight line in a curved space.
Geodesics are a part of the fundamental construction of Differential Geometry. They are also important physical, measurable solutions in General Relativity.
Here are several possible definitions of geodesics, some more rigorous than others:
1) A geodesic is a curve which gives the shortest distance between two points in a curved space. This is almost true, given a few caveats. It serves as a good conceptual definition, if not a perfect mathematical one.
2) A geodesic is a curve which has zero acceleration tangent to its geometric space. For a two-dimensional surface, then, a geodesic is a curve in the surface whose acceleration is perpendicular to the surface. To be mathematically precise, we would need to include reparameterizations of these curves, but this is a minor point.
3) A geodesic is a trajectory in which an observer would feel no acceleration. A nice physics definition, if lacking in mathematical rigor.
The point is, a geodesic is the closest thing to a straight line in an arbitrary curved space.
Mathematical examples of geodesics:
--In a flat plane, or in any flat n-dimensional space, the geodesics are straight lines (as one would expect).
--On the surface of a sphere, the geodesics are great circles (circles which cut the sphere exactly in half).
--On the surface of a cylinder, the geodesics are straight lines parallel to the axis, circles perpendicular to the axis, and helices (spirals).
--In the Poincaré half-plane, geodesics are straight vertical lines, and circles whose origin is on the x-axis (I just had to throw in an esoteric example).
There are several different mathematical methods for determining the geodesics for a given geometric space, none of which am I going to describe for you now.
A good conceptual demonstration is to look at a flat projection map of the earth. Choose two points on the map, at different longitude, but the same lattitude. On the flat map, a straight line between these points would simply be a parallel of lattitude, i.e. a horizontal line. In general, this is not the shortest distance between the two points. For example, the shortest path between Sydney, Australia and Buenos Aires, Argentina is a course which skims the coast of Antarctica. If you don't believe me, look on a globe. What appear to be curved paths are actually the "straightest" a path can possibly be on the curved surface of the earth.
In General Relativity, geodesics are the trajectories of objects in freefall. For example, the moon's trajectory around the earth is a geodesic, as is the earth's path around the sun. All of these astronomical bodies appear to be following a curved path, but in reality are following a straight line in curved space*. This curvature is caused by the presence of a very large amount of matter, and is a phenomenon commonly known as gravity. As mentioned before, these freefall trajectories are such that no acceleration is felt. Thus, an observer in freefall feels no forces, just as if she were floating freely in outer space, in the absence of gravity. Anyone who has experienced freefall on a rollercoaster, for example, knows what this feels like.
The point here is, according to the General Relativistic model, gravity is not truly a force. Mass curves space, and curved space causes "curved" trajectories (not actually curved, just apparently curved). Thus this fundamental "force" can be described entirely by geometry, a remarkable feat indeed. For example, when the path of a light ray is "bent" by some gravitational field, it is not because gravity is "pulling" the light ray towards the source (photons are massless, and so do not "feel" a gravitational "force"). The light ray merely seeks out the shortest possible path, which may not be what we perceive to be a "straight line".
Since most of us (those of us who are not astronauts) spend our entire lives under the constant influence of gravity, we have developed a particular notion of what a "straight-line" trajectory is, and what a "curved" trajectory is. We think that jet planes travel in straight lines, and flying snowballs follow curved arcs. The truth is just the opposite.
*Actually curved spacetime, but I prefer to avoid cluttering up the discussion with any more fancy physics terminology than necessary.