How it works will depend on how the people have their computers and browsers configured.
For example, by default Firefox will open PDF files directly without downloading them completely, using its own internal PDF reader. However, if you install programs like Adobe Acrobat Reader or Adobe Acrobat Pro or other programs, they may install a plugin in the browser and change the default to use their own renderer instead of the built-in pdf reader. It will still show up inside the browser, and will not download on user's computer but may look different.
Also, user can choose to force download to open in an external PDF viewer and for example, I have it set like that because I find Adobe Acrobat Pro very convenient and renders things much better than the default Firefox renderer.
Some notes... if you want the reader to only download parts of your pdf as needed, then you also have to save your PDF file as "web optimized", the internal layout of the pdf file must be a bit different compared to saving as a regular file, which would use higher compression and other things.
As an analogy, it's sort of like "solid compression" or regular compression, where in solid compression mode files can be compressed much better but in order to extract a single file out of the archive, the decompressor has to extract ALL the files up to the desired file while with regular compression,the decompressor can skip to a random file within an archive.
but to make a pdf show up on a page the code is as simple as this :
<objectdata="http://yoursite.com/the.pdf"type="application/pdf"width="750px"height="750px"><embedsrc="http://yoursite.com/the.pdf"type="application/pdf"><p>This browser does not support PDFs. Please download the PDF to view it: <ahref="http://yoursite.com/the.pdf">Download PDF</a>.</p></embed></object>
the embed tag should work by default, if it's not supported then it should fallback to object (or the other way around)
Some browsers won't accept either, and that's where that pdf.js link comes in play ... your page loads that, which then reads the pdf file and renders it as html on the users' computer on the fly.