This reaction is the formation of a sulfonate ester. We do this to create a good leaving for a nucleophilic attack. Recall the OH group is not a good leaving group under most circumstances.
This is a substitution type of a mechanism ...think of it as SN2-like.
Hope this helps.
Dr. Romano