WordPress allows configuration for setting the number of posts to be displayed whenever an index archive (the typical homepage) or other archives like category or monthly archives are displayed. This option can be configured in the Blog Pages field Reading tab under Options menu in the administration User Interface. Note that there is a separate field for configuration number of posts to be displayed for syndication (feeds).
posts_per_page is set in the method
get_posts of WP_Query.
Plugin and theme authors need not access this global variable directly. WordPress uses it internally to calculate the number of posts to be displayed.
Since the same setting is used for all archives Matt Read has developed a plugin where posts per page setting can be set for different types of archives, e.g., search, category, home, monthly, yearly, etc.
Back to full list of global variables.