On the Discord Web/Desktop App, you're only 'online' if you're actively using the web app. After you cease engaging with the online app, your status will be changed to 'Idle' in 10–15 minutes. It makes no difference whether your computer is turned on or not.