From Rome Fiumicino airport, there are two train lines. One goes nonstop to Roma Termini station, and one goes with intermediate stops to Roma Tiburtina station. Just make sure you get on the correct one for your next train to Matera.
If you wait to buy your ticket at the airport train station on arrival, they will sell you tickets for both trains (airport to Rome and Rome to Matera). This way, you don't have to worry about making a particular train, in case of delays.
If you are searching schedules, do use the "Roma (tutti)" option, since this will include both stations. But "tutti" means "all" - it's not a station. You have to know whether your train is leaving from Tiburtina or Termini.