About 7.55pm, a train guard was working on an eastbound train from Penrith to Hornsby when the teenager alighted the train at Werrington Railway Station and stood on the platform.
As the train was leaving the platform, the teenager allegedly leant forward and spat at the train guard who was standing within the open door of the guard’s carriage.
The teenager then left the station in a westerly direction.
Shortly after, officers attached to Public Transport Command Penrith attended and arrested the 17-year-old on Victoria Street, Werrington.
He was taken to Penrith Police Station and charged with ‘common assault’.
The teenager was issued a Court Attendance Notice, to appear at a children’s court on Thursday, July 9.