By default, Firefox uses it's built-in PDF viewer. It relies on JavaScript working properly within your browser. This link tells you how to fix some common problems:
http://support.mozilla.org/en-US/kb/view-pdf-files-firefox-without-downloading-them
However I prefer to open PDF files in a separate program. (My own choice is Sumatra PDF but you could also use Adobe Reader, Foxit or something similar). The instructions are here:
https://support.mozilla.org/en-US/kb/disable-built-pdf-viewer-and-use-another-viewer
(Obviously you need to ensure that the relevant program is installed on your computer before being able to select it from the menu).
Once you've got that set up, clicking on a PDF link downloads the file and opens it in your chosen program (rather than within a browser window).