This isn't specific to Mapbox. What you want to do is convert a series of points into a line feature.
GeoJSON is probably the easiest format to tinker with for this, so try converting your CSV to that.
Then, read up on the format:
http://geojson.org/geojson-spec.html
And play around with it here to see it visually:
Basically you are most of the way there already, you just need to define things as a line.