To create a custom table, you can use the global WP DB object and the DB delta function. By using the plugin activation hook, you can create a new table with three fields: ID, name, and email. This will allow you to store form submissions and fetch them later using custom routes and endpoints.