You have two options by train to get from Rome to Positano: you could either take a train to Naples or to Salerno. By choosing the first option, once you get to Naples Central Station (Stazione Garibaldi), you'll have to switch to the Circumvesuviana directed to Sorrento.