If the net change of a reaction is the replacement of a ligand on a chiral center in a reactant and if, in the product, the replacement ligand occupies the site opposite to that occupied by the replaced ligand in the reactant, the reaction is said to occur with inversion of configuration.
The net reaction is the replacement of chlorine atom in 1 with a thiol group. In the product (2), the thiol group occupies, on the chiral center, the site opposite to that occupied by the chlorine atom in 1. Therefore, the reaction occurs with inversion of configuration. Inversion of configuration in this reaction is a result of the reaction being an SN2 reaction, which requires the nucleophile ¯SH to approach the chiral atom from the side opposite to the side of the chlorine atom.