Once a user has created an issue or comment, Jira will not allow you to delete the user. In fact, deactivating a user is usually a better approach than deleting the user completely. Once the user is deactivated, the user cannot log in to Jira, and this will not count toward your license count.
You cannot deactivate a user when you are using external user-management systems, such as LDAP or Crowd from Jira—you need to do so from the user-management system of the source.