The FOREIGN KEY constraint is used to enforce a link between the data in two tables. A foreign key in one table points to a primary key in another table, maintaining referential integrity.