When there are multiple instances and there is no other way to distinguish them* you can refer to the instance index, i.e. 'which one'.
CSS
a.instanceLink:nth-child(1)
or
a.instanceLink:nth-child(2)
XPath
Note: 0 based index
a[@class='instanceLink'][0]
or
a[@class='instanceLink'][1]
You can see these in chrome tools, e.g.
css - $('a.instanceLink:nth-child(1)')
xpath - $$('a[@class='instanceLink]')[0]
This is true for the example given. However this now creates a new problem. You now have locators that are tied to the layout of the page, i.e. that there must be two links, not one or three and the one you want is in a specific position. The makes the test more fragile and subject to being broken by page layout or content changes in the future. In other cases where there is a way to distinguish the links from other markup (but again not relying too heavily on layout).
For example for a page that is
<span id="header">
<a href='x.html' >link</a>
</span>
<span id="footer">
<a href='x.html' >link</a>
</span>
instead of using an index you may be better off using .header a
or .footer a
as they are unique and also have semantic meaning ("header") which [0] does not.