An electronic device includes a display, a communication circuit wirelessly communicating with a wearable device, a memory storing contents associated with exercise, and a processor electrically connected with the display, the communication circuit, and the memory. The processor is configured to obtain information about an exercise program including a first section and a second section, to output contents corresponding to the first section on the display, and, if data associated with the first section, that is obtained from the wearable device, satisfies a specified condition associated with the first section, to output contents corresponding to the second section on the display.