The Messenger of Allah ﷺ said that whoever fasts Ramadan and then fasts six days in the month of Shawwal has fasted the whole year, since each good deed is multiplied by ten. Thus the thirty days of Ramadan equal three hundred days and the six days equal sixty which together make up the whole year of three hundred and sixty days. The scholars say that what is meant is that one has the reward of a whole year’s compulsory fasting, not merely supererogatory fasting. The Prophet ﷺ also said that whoever completes Ramadan and the six days will emerge as free from sins as a new born baby. It is thus recommended to fast any six days of Shawwal.
Imam al-Nawawi said that it is preferable that they be fasted consecutively immediately after Eid and this is one of the reasons why the people of Tarim generally fast the six days from the second of Shawwal. The Ramadan schedule and atmosphere thus continue for another six days. It is also easier on the self (nafs) to continue doing what it has become accustomed to, whereas if fasting these six days were left to the end of the month it would be much harder to achieve. The people of Tarim then celebrate Eid a second time once they have fasted the six days and they have attained the promised reward.
Some of the scholars also allow for intentions to be combined. Thus if someone has Ramadan fasts to make up they can intend making up the compulsory fast along with the sunnah of the six days of Shawwal. The scholars also mention that fasting in Sha’ban before Ramadan resembles praying the supererogatory prayers which come before the obligatory prayer, while fasting in Shawwal after Ramadan resembles praying the supererogatory prayers which come after the obligatory prayer.
Note: the rulings mentioned are based on the Shafi`i school. Other schools may differ slightly.