How routers work? Where must be the routers?

How routers work? I have read the documentation and understand the syntax used to address my pages, now I want to make a simple login and wanted to know where in the project ecriben routers on the controller, at the hearing, in the config; What part of the project I put it? I want to make a simple login

edited Oct '15

Check this tutorial:

There are other ways of doing it. Search the forum, there are many examples. Also check other tutorials in the documentation.