There are 2 ways:
Using linkText(): The command finds the element using link text and then click on that element and thus the user would be re-directed to the corresponding page.
Using partialLinkText(): This command finds the element based on the substring of the link provided in the parenthesis and thus partialLinkText() finds the web element with the specified substring and then clicks on it.
Example:
driver.findElement(By.linkText("Facebook")).click();
driver.findElement(By.partialLinkText("Faceb")).click();