The Meaning of “~” in Definitions
The use of this swung dash means the entry character or word is used in the corresponding words.

2 旧时指读书人：～子。～民。学～。

... is equivalent to:

2 In olden times, refers to educated people. 士子。士民。学士。

This is a common typographical convention, used in many dictionaries globally, including in English.
EDIT: for reduplication or for other forms of repeat of the entry, the swung dash is often repeated, viz for 面

~ ~ 相觑

... is equivalent to

面面相觑.