yomyom,
Well, this isn't really a Delphi question, but here goes:
PDF files are created using Adobe Acrobat (full product, not just Reader). When you install this, it creates a printer driver that generates PDF's when you print things from other applications, such as your custom Delphi applications, Word, IE, etc. To create the PDF, you simply print your document to the Adobe printer driver.
Acrobat reads the output stream, prepares the PDF file, prompts you for the filename, and then saves everything accordingly. It's pretty slick, really.
Acrobat also has an extensive SDK, so it's pretty easily to automate using Delphi and other programming languages (Details:
I have heard of free alternatives to Adobe Acrobat, but have not used them. There are several listed in google.
Hope this helps...
-- Lance