Custom columns for custom post types

How to add custom, sortable columns to the edit posts screen for custom post types in WordPress.