This is set on the Emails section of the users preferences page. The default setting is to send an email to a user if someone quotes them, replies to their post, mentions their username, or invites them to a topic when the user is away from the forum:
If you are finding that users are not being sent emails for this, have a look at your
default email level site setting. The default value of that setting is “only when away.” Make sure that it isn’t set to “never.” You can adjust the email settings of all users on your site by making changes to your
default email level site setting and selecting the option to apply the changes historically.