What is referential integrity in DBMS?

Referential Integrity ensures that data which is referred to by a table (entity) within db is consistent and reduces the chances of any obsolete instances

This is done by means of defining a FOREIGN KEY constraint which checks if value you’re trying to insert to a child table for relating to its parent is a valid value existing within Parent and uniquely identifies a row within it. So effectively FOREIGN KEY in a child table will refer to a PRIMARY KEY within your parent table