Joomla 3.x site generate url with article id if you just use joomla core sef with mod rewrite. Your url should be like http://www.yoursite.com/12-how-joomla-works.html. Now if you want to remove article id(12) from the url so that your url looks like http://www.yoursite.com/how-joomla-works.html then you can use extensions like sh404SEF, JoomSEF and SEF Advance or can edit core file to remove the article id from url.
3rd party extensions has option to edit the url. It is simple and easy. Just edit the url and remove article id from the url and save it. Then no more article id will be in your url. They also have options to setup, so that article id will not include in the url.
There is one more way to remove article id from url. You need to assign that article to a menu link. Then article id will not be in the url.
If you want to manually remove article id from url then follow below instruction:
Go to http://www.yoursite.com/components/com_content/router.php, open the php file with your editor. Now go to line 38 and 290. There are two places where you will see a code like below:
Now both of the places replace with below code:
There is one more place where you need to edit the code. Go to line 426 and you will see a code like below:
Now in that place replace the code with below line:
Save the file and upload the file in your server. Remember every time you update joomla, you will have to do this task every time since joomla update will replace this file.