I know that stackoverflow.com uses the module pathauto. I would like to use pathauto in drupal to create pathauto uris. But I don't know how to do this.
Example: domain.com/node/1 after using pathauto then domain.com/article/1/title-node
Now I want to go to domain.com/article/1/??? then still it shows node 1 instead of show page not found.
You can't do that with pathauto since all it does is creating aliases for your URLs. So you have to use an URL like http://example.com/article/1/title exactly as it was generated.
Stack Overflow goes a slightly different way in the sense that they simply ignore whatever comes as question title in the URL. They can do that since the URL parser is entirely different. For Drupal you may want to look for another module or roll your own. Pathauto just taps into the normal URL aliases and auto-generates them for you. No more, no less.
A search for modules which deal with URLs on drupal.org yields quite a few matches. Some of them might do what you want.