There are 2-3 trains per hour between Gare Saint Charles in Marseille and Aix-en-Provence Centre. The trip takes about 40 minutes and costs € 7.30 per person (one way, TER train 2nd class). From the train station in Aix-En-Provence it is only a 10 minutes walk to the center of the city. It's useful to check the timetable in advance.
TIP: Better choose for a TER train to Aix-En-Provence Centre. There is also a TGV station, but it's located 18 kilometers outside the city center.
How do I get to the train station from the cruise port in Marseille?
Gare Saint-Charles, the train station in Marseille, is located on Place de Marseillaises, outside the city center. The station is very large and busy. You will find both a metro, the regular trains, buses and the TGV station. The fastest way to go there is by taxi. The ride costs around € 30 per taxi (4 persons one way) and takes about 25 minutes.
There is a cheaper alternative using a bus-subway combination. For € 1.50 per person (one way) first take bus 35 to La Joliette (15 minutes). There you take the metro to Gare Saint-Charles (red line n°2 towards Sainte-Marguerite Dromel). The underground takes only 2 minutes and costs € 1,50 per person as well (one way).