There is no built-in SharePoint mechanism to do this. It is frequently requested, particularly for public-facing sites, usually for purposes of SEO and for vanity domains. In both cases the re-writing is usually unnecessary and should be resisted. Apart from anything else, URL rewriting is not supported. It can also affect performance significantly if you have complex rules, and you risk breaking something in SharePoint.
Having said that, we live in the real world ;-)
Microsoft have an add-on for IIS7 called URL Rewrite that does the job. There is also a third-party module called urlrewriter.net. Both of these work; neither are supported. You will need to disable them or possibly remove them to get support from Microsoft. But I would still avoid using rewrites unless it was really necessary.
A better approach may be to redirect rather than rewrite. This means sending a 301 (permanent) or 302 (temporary) redirect to the browser. It involves an additional round-trip to the browser, and the actual URL will appear in the browser address bar, but depending on circumstances this may be acceptable. This method is supported because you are not interfering with the actual SharePoint URL. Rewriters are usually also capable of doing redirects, or you may be able to use a SharePoint redirect page depending on the required URL.