Search Engine Friendly (SEF) URLs is one of the setting in Joomla SEO that removes all automatically generated words and numbers from your URL and replaced it with the alias of the menu item that you are using on the page.
URL rewriting is one more setting in Joomla SEO that removes index.php from the end of the url.
This two function are interrelated and when you switch on both of them you will get a superior optimized friendly URLs. How you can do this, read bellow: