Check out example codes for "hyperlink with a controller function in lightning component". It will help you in understanding the concepts better.

Code Example 1

<a href="javascript:void(0)" onclick="{!c.doSomething}">
            Click me to do Something 
</a>

Learn ReactJs, React Native from akashmittal.com