How to create link using apex in Salesforce?

<apex:outputLink/>

<apex:commandLink/>