Acts 18:18 Paul stayed on in Corinth for some time. Then he left the brothers and sailed for Syria, accompanied by Priscilla and Aquila. Before he sailed, he had his hair cut off at Cenchrea because of a vow he had taken.
From the IVP Bible Background Commentary (the first place I go to for such trivia): Jewish people shaved their heads after competing a Nazirite vow, and Paul's faith in Jesus had not diminished his own Jewishness in the least (21:23-24). That Palestinian teachers demanded that Nazirites fulfill the vows in Jerusalem shows that Paul had taken the less Jerusalem-centered approach of Diaspora (non-Palestinian) Jews who had not the time or money to travel to Jerusalem frequently.
Darrell L. Bock in the ECNT however thinks that it "may be a mere vow of thanksgiving for the preservation as God promised in verse 10 (Witherington 1998:557; Bruce 1988a:355 opts for a private vow)
Acts 18:10 For I am with you, and no one is going to attack and harm you, because I have many people in this city."
He concludes "Since, however, 1 Cor 9:20 explains that Paul was a Jew to the Jews, such a vow, if Jewish practice, was not out of character for him in certain circumstances. In addition, the Mishnah, as already noted, allows for the hair to be cut before the sacrifice is made. It seems more likely that Paul acts out of his Jewish heritage rather than following Greek practice. So probably a private vow is more likely than a Nazirite vow. At any rate, whether a Jewish or Greek practice, the act is not at all unlikely.