All mercurial commands are initiated with the hg prefix. To see a list of some of the common commands, run Template:Cli
You can either work with a pre-existing repository (collection of code or files), or create your own to share.
To work with a pre-existing repository, you must clone it to a directory of your choice: Template:Cli
To create you own, change to the directory you wish to share and initiate a mercurial project Template:Cli
It is then just a case of adding the specific files you wish to track: Template:Cli
You can then create a Template:Filename to ensure that only the files you wish to include in the repository are tracked by mercurial.