How long should a study session be?

Start with 25 minutes. If that goes well, try longer. If you keep quitting, go shorter. The right length is the one you'll sit down for again tomorrow.
25 minutes comes from the Pomodoro Technique by Francesco Cirillo: 25-minute sessions with breaks in between. It's a good place to start, and you can change it.
Match the length to the work
- 15 minutes: flashcards, or a subject you've been avoiding.
- 25 minutes: reading, notes, practice questions.
- 50 minutes: an essay, a long proof, anything that takes a while to get into.
Decide before the timer starts
“Study biology” is too vague. “Finish the questions on page 42” tells you when you're done. Write it down before you press start.
Leave your phone in another room
A break should get you out of the chair: water, a stretch, the window. If you pick up your phone, five minutes can easily become twenty.
Keep a log
Write down the subject and the minutes after every session. After a week you'll see where your time really went. The subject you think you've been working hardest on may not be at the top.