Online forms are integral tools used in email marketing to collect data from website visitors. These forms capture a variety of information such as names, email addresses, and other relevant details. The collected data is then used to build a mailing list, which is crucial for targeted email campaigns.