An electronic device comprising: a display; a pen sensing panel disposed inside the display or on a rear surface of the display and configured to receive a first signal from an electronic pen through a first communication protocol when the electronic pen is within a first spaced distance from the electronic device, wherein the first spaced distance indicates the range in which the pen sensing panel can receive the first signal from the electronic pen through the first communication protocol; a communication circuit configured to receive a second signal from the electronic pen through a second communication protocol when the electronic pen is within a second spaced distance from the electronic device, wherein the second spaced distance indicates the range in which the communication module can receive the second signal from the electronic pen through the second communication protocol and is further than the first spaced distance from the electronic device; a memory configured to store at least one application; and a processor electrically connected to the display, the pen sensing panel, the communication circuit, and the memory, wherein the processor is configured to: execute the at least one application in response to a user input, and while the at least one application is displayed through the display, execute a function supported by the at least one application, when the second signal is received through the communication circuit but the first signal is not received through the pen sensing panel; characterized in that: the processor is configured to output a screen through the display in which one or more executable icons are arranged, each executable icon corresponding to a different application or function, when the first signal is received through the pen sensing panel while the at least one application is displayed through the display. a display; a pen sensing panel disposed inside the display or on a rear surface of the display and configured to receive a first signal from an electronic pen through a first communication protocol when the electronic pen is within a first spaced distance from the electronic device, wherein the first spaced distance indicates the range in which the pen sensing panel can receive the first signal from the electronic pen through the first communication protocol; a communication circuit configured to receive a second signal from the electronic pen through a second communication protocol when the electronic pen is within a second spaced distance from the electronic device, wherein the second spaced distance indicates the range in which the communication module can receive the second signal from the electronic pen through the second communication protocol and is further than the first spaced distance from the electronic device; a memory configured to store at least one application; and a processor electrically connected to the display, the pen sensing panel, the communication circuit, and the memory, wherein the processor is configured to: execute the at least one application in response to a user input, and while the at least one application is displayed through the display, execute a function supported by the at least one application, when the second signal is received through the communication circuit but the first signal is not received through the pen sensing panel; characterized in that: the processor is configured to output a screen through the display in which one or more executable icons are arranged, each executable icon corresponding to a different application or function, when the first signal is received through the pen sensing panel while the at least one application is displayed through the display. execute the at least one application in response to a user input, and while the at least one application is displayed through the display, execute a function supported by the at least one application, when the second signal is received through the communication circuit but the first signal is not received through the pen sensing panel; characterized in that: the processor is configured to output a screen through the display in which one or more executable icons are arranged, each executable icon corresponding to a different application or function, when the first signal is received through the pen sensing panel while the at least one application is displayed through the display.