In general, use LayoutsPageBase as a base class for pages that should only be accessible to authenticated users with certain rights. For pages to which even unauthenticated users should have access, use the parent class UnsecuredLayoutsPageBase.
Typically, you create a class in a code behind (.aspx.cs) file that derives from LayoutsPageBase. Your .aspx file, in turn, inherits from your custom page class. For example, the c:\Program Files\Microsoft Shared\web server extenstions\12\TEMPLATE\LAYOUTS\CreateWebPage.aspx page that ships with Windows SharePoint Services 3.0 inherits from an internal class named CreateWebPage which itself inherits from LayoutsPageBase.