In Sitecore pre Sitecore 9, you can use the LinkProvider to create url for SItecore items. It also allowed you to customize how url are generated and how it should render on website.
Sitecore 9 and up uses ItemUrlBuilder. It supports both standard MVC and headless api driven sites.