In the previous mitzvah, we said that we are prohibited from sending away the eved Ivri, who was indentured to pay off a debt, empty-handed. In this mitzvah we are told of the obligation to give him gifts.
The male servant leaves at the end of six years or upon the arrival of the Jubilee year, which is every fifty years, after seven Sabbatical cycles. The female servant, acquired as a minor, would also go free upon showing signs of puberty. In any of these cases, the servant is to be paid a nice "severance package." Those who go free because they have paid the master for their remaining years of labor do not receive this bonus since the Torah specifies "when you send him free" and the one who pays off his debt has freed himself.
The reason for this mitzvah is as we stated in the previous mitzvah: we must learn to be generous and to show our gratitude to those who have worked for us. This makes us better people, helps out the other guy, and makes God proud of His children.
This mitzvah only applies in Temple times. It is discussed in the Talmud in the first chapter of tractate Kiddushin (pages 14b-17b) and codified in the Mishneh Torah in the third chapter of Hilchos Avadim. This mitzvah is #196 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos.