It depends on your goals. If you're trying to get a passing grade, it's best to study for a short time and then take a break. If you're trying to pass an exam, you should study for longer periods and take breaks when needed.