The question of page size parameters is quite complicated. LaTeX2e introduced the parameters
\paperwidth
\paperheight
and the document class options to set the paper size. Previously the pagination parametes were tailored for US Letter paper and in Europe it was common to use document style options such as a4.sty.
This has actually no influence on the output, that in the days of DVI format was deferred to the printing driver. Typically one had also to pass an option to dvips for choosing the paper size (or set it in the configuration file of dvips).
With the advent of pdftex there was a problem: the PDF format must know in advance what paper format is to be used. So the new parameters \pdfpagewidth and \pdfpageheight were introduced. They are set when the pdflatex format is created. Indeed TeX Live and MiKTeX have preferences that are set at installation time for choosing the "normal" paper size. This has no influence on the default paper size for LaTeX, which always is letterpaper, so the a4paper option must be specified.
Thus a PDF created with pdflatex on a TeX Live where A4 is the default paper size, will output A4 paper format also when the document class option letterpaper is specified.
One can override the default setting by passing explicitly the paper dimensions to the parameters, say
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
for US Letter paper. However a better way is to say
\usepackage[letterpaper,pass]{geometry}
where the pass option tells the package to only set the paper size (that is, the value of the two above parameters). The package knows when the typesetting engine is pdflatex, latex, xelatex or lualatex and do the right thing.
The standard LaTeX classes have a limited knowledge of paper sizes:
letterpaper a4paper a5paper b5paper legalpaper executivepaper
while geometry knows much more. Also memoir knows many paper formats; this class and the geometry package allow for specifying arbitrary paper sizes (under the constraints of TeX, which doesn't manage dimensions larger than 16384pt, slightly less than 19 feet or 6 meters).
Thus the best way to set the paper format is with geometry (or memoir, that has a different model):
\usepackage{geometry}
\geometry{paperwidth=18cm, paperheight=24cm}
possibly adding other options for setting margin widths and so on; consult the manual. One can also specify imposition: if we want to print the format above on A4 paper for later cropping, it's possible to say
\usepackage{geometry}
\geometry{a4paper, layoutwidth=18cm, layoutheight=24cm}
geometrypackage. So\usepackage[paperwidth=<length>,paperheight=<length>}]{geometry}. – Peter Grill Jun 27 '12 at 19:19