How to Add Custom Post Type and Taxonomies to WordPress

How to create a custom post type that can be used as a portfolio. You can also add custom categories to your new post types.