To build this functionality you can call a backend function (inside of a .jsw file) that triggers a email when the custom form is submitted.
Check out the TriggeredEmails API if the form is being submitted by a member or contact.
You can also refer to the following example to learn how to accomplish this for external emails using a third party api.