A refrigerator includes a storage chamber, a cold air supply which supplies cold air to the storage chamber, a first tray which forms a part of an ice making cell that is a space where water is phase-changed into ice by the cold air, a second tray which forms another part of the ice making cell and which may come into contact with the first tray during an ice making process and may be separated from the first tray during an ice transfer process, a heater adjacent to at least one of the first tray or the second tray, a sensor which determines the position of the second tray in a movement process of the second tray, and a control unit which controls the heater.