UI policy acts when a record is inserted or updated through a servicenow UI i.e servicenow forms while data policy acts whenever a record is inserted or updated into database through any means.