For example I have copied the following pieces of HTML from the https://www.wikipedia.org .
The anchor element <a> along with the id=”js-link-box-ru” indicates one link .
As from the title it says that it will redirect you to the Russian version of wikipedia.
<a id="js-link-box-ru" href="//ru.wikipedia.org/" title="Russkiy — Википедия — Свободная энциклопедия" class="link-box" data-slogan="Свободная энциклопедия">
<strong>Русский</strong>
<small><bdi dir="ltr">1 887 000+</bdi> <span>статей</span></small>
</a>
To click on the link using the id locator we can use the following syntax –
driver.findElement(By.id(“js-link-box-ru”)).click();
To know how this driver object has come, you have to check the post on –Different web drivers invoking using selenium java