That has nothing to do with Wordpess. It simply is using anchors to take you down or up the page.
If an element on the page has a unique id, you can create an anchor tag to link to that id (and it will take you there on the page)
e.g.
<div id="anchor">...</div>
<div id="something-else>...</div>
<a href="#anchor">Click here to go to id=anchor div</a>
<a href="#something-else">Clicker to go to something-else id div</a>
The Wordpress theme you gave an example of also had Javascript or jQuery smoothing - so it would scroll nicely to the anchor, instead of instantly taking you there like plain HTML would do.