If you want to click a button or set an value to an web element through selenium you can use XPATH variable ,for using XPATH variable you must find the value of it ,you can find it using Firefox browser and few add_on's like firebugs .
driver.findElement(By.xpath(".//*[@id='main']/div[4]/div/button")).click();
I would suggest you to use XPATH variable so that you can locate any web element in a webpage.
If you want find the hyperlink web element then you can use By.linkText when you are sure about the tag name or choose By.partialLinkText by which you can locate even if you partial web element name but in this case your partial search key matches more than one element then By.partialLinkText won't works fine.
For example,in case you knows the complete tag name of hyperlink use can use
driver.findElement(By.linkText("Click to Next Page")).click();
or else
Where you knows only a partial tag name
driver.findElement(By.linkText("Next Page")).click();
The secound option will not help you in all instances.