How can I subscribe emails via a custom form? And a CF7 form?

Also, how to add them to a specific group?

Thanks!