Accessors and Mutators are used in object-oriented programming to deliver access to private variables of the object. These methods are also called getter and setter since they help get and set the object's private variables.