Post types are stored in the database, along with all of the other content on your website. When you create a new post, WordPress stores the post in the wp_posts table in the database. The post_type field in this table is used to identify the type of post that is being stored. For example, when you create a new post, the post_type field will be set to "post" by default. When you create a new custom post type, the post_type field will be set to the custom post type's slug, which is a unique identifier that you define when you create the custom post type. In addition to the wp_posts table, WordPress also stores post-type-specific data in other tables in the database. For example, the wp_postmeta table is used to store metadata for posts, and the wp_term_relationships table is used to store relationships between posts and categories or tags.