A watch type device comprising: a main body; a display located at a front side of the main body and configured to display information; a heartbeat sensor located below the display and located at a rear side of the main body, wherein the heartbeat sensor comprises a light emitting unit and a light receiving unit, and wherein the heartbeat sensor is configured to detect a heartbeat using the light emitting unit and the light receiving unit; and a controller operably coupled with the display and the heartbeat sensor, wherein the controller is configured to: identify a wearing state of the watch type device and a non-wearing state of the watch type device using the light emitting unit and the light receiving unit; change a lock state of the watch type device to a lock released state of the watch type device in response to receiving of a lock release command while in the wearing state and continue the lock released state while the watch type device is in the wearing state; when wrist wearing is released, change the lock released state to the lock state; change the lock state to the lock released state in response to receiving of the lock release command after identifying that the watch type device is in the non-wearing state; and while the watch type device is in the non-wearing state, each time a standby screen is changed into a black screen in the sleep mode as a screen off state, receiving of the lock release command is required in order to change the black screen into the standby screen. a main body; a display located at a front side of the main body and configured to display information; a heartbeat sensor located below the display and located at a rear side of the main body, wherein the heartbeat sensor comprises a light emitting unit and a light receiving unit, and wherein the heartbeat sensor is configured to detect a heartbeat using the light emitting unit and the light receiving unit; and a controller operably coupled with the display and the heartbeat sensor, wherein the controller is configured to: identify a wearing state of the watch type device and a non-wearing state of the watch type device using the light emitting unit and the light receiving unit; change a lock state of the watch type device to a lock released state of the watch type device in response to receiving of a lock release command while in the wearing state and continue the lock released state while the watch type device is in the wearing state; when wrist wearing is released, change the lock released state to the lock state; change the lock state to the lock released state in response to receiving of the lock release command after identifying that the watch type device is in the non-wearing state; and while the watch type device is in the non-wearing state, each time a standby screen is changed into a black screen in the sleep mode as a screen off state, receiving of the lock release command is required in order to change the black screen into the standby screen. identify a wearing state of the watch type device and a non-wearing state of the watch type device using the light emitting unit and the light receiving unit; change a lock state of the watch type device to a lock released state of the watch type device in response to receiving of a lock release command while in the wearing state and continue the lock released state while the watch type device is in the wearing state; when wrist wearing is released, change the lock released state to the lock state; change the lock state to the lock released state in response to receiving of the lock release command after identifying that the watch type device is in the non-wearing state; and while the watch type device is in the non-wearing state, each time a standby screen is changed into a black screen in the sleep mode as a screen off state, receiving of the lock release command is required in order to change the black screen into the standby screen.