trailingslash_it() function adds a
/ to the end of a URL if it lacks one.
user_trailingslash_it() uses the permalink template as set under Settings > Permalinks to decide whether to add or remove the trailing slash from the end of the URL
For example, if you had the permalink format set to
/%year%/%monthnum%/%day%/%postname%/ (note the trailing slash),
user_trailingslash_it() would append a trailing slash to the URL passed in as the first parameter.
If the permalink format was
/%year%/%monthnum%/%day%/%postname% (no trailing slash), any trailing slash on the URL would be stripped off.
user_trailingslashit() forces the URL to be consistent with what is set in the permalink preferences.