Unless you have explicitly disabled link shortening for a social account, any links you paste into the composer will be automatically shortened. By default, the buff.ly link shortener will be used, but this can be changed by heading to Settings. Learn more about link shortening options here. In some cases, you may prefer to use the full link instead of the short link. To do this, hover over the link in the composer after it's been automatically shortened and click Unshorten.
Please note, it's not possible to unshorten a link once the post has been saved. In that case, you'd need to create the post again and delete the original post.