Motivation comes from having (personal) goals.
The rest is confronting your fear, boredom, and anxiety; managing your time and energy; developing good habits and process; and knowing when to ask for help or study up. You have to be an expert at getting unstuck.