Q:

Straight lines in general relativity

This question stems from a possibly misguided attempt to understand General Relativity. I am about to leave High school for college, I do however have a rudimentary understanding of tensors, and I have done a great deal of research into non-euclidean geometries and their extrinsic analysis over the last few months.
Using a 2 dimensional spherical geometry as an example, straight lines can be defined as great circles on the sphere representing the geometry, when embedded into a 3 dimensional euclidean geometry.
What is the equivalent definition of straight lines in the curved space-time of general relativity?
The two things I am struggling with are:

How to imagine a 5 dimensional embedding of the 4 dimensional space-time
How to define a straight line in geometry with somewhat random curvature (What I mean by this is that the mass distribution affects the curvature, but the mass distribution cannot be described by a "nice" mathematical function, as far as I am aware.) 

I have come across the concept of Geodesics and I have read the page https://en.wikipedia.org/wiki/Geodesics_in_general_relativity and various others however, possibly unsurprisingly, I was not really able to make head or tail of it.

A:

First of all, don't think about embeddings: there is no notion (in GR) that spacetime is embedded in some higher-dimensional flat space (let alone a five-dimensional space): it's just what it is.  This is not to say embeddings are not interesting, but it is a red herring to worry about them too much.
So, straight lines.  As you say, in general there is no nice function that defines the curvature of spacetime.  But (except when things go wrong, which they unfortunately can do) the function that defines the curvature is not extremely nasty.  What this means is that it is sufficiently differentiable: I will be vague about just how differentiable because it is a complicated issue.
OK, so consider two points in spacetime.  Well, we can make paths -- curves -- between these points, and so long as things are reasonably sane, we can do two things:

we can deform these curves into each other in some continuous way, constructing a family (an infinite, and in fact continuous family) of curves, all of which go between the same two points;
We can assign a length to each curve in the family, using the metric (which defines the curvature as well).

And now we can find the curve which is shortest from the family of curves, and this curve is a geodesic connecting the two points.  This curve is the equivalent of a straight line.

So, I've skated over a bunch of things here:

the metric of GR is technically a pseudometric and this means that in most interesting cases (timelike geodesics) you actually want to find the longest curve;
the shortest (longest) curves may not be unique;
there is another notion of straight line which is a curve which is (locally) parallel to itself (technically if you drag the tangent vector to the curve along it, it remains a tangent vector to the curve) -- in GR these curves are the same curves defined by being extrema of length.

There is a lot of other detail I have omitted here -- I'm trying not to drown you in detail -- but I hope this gets the idea across.

