Okay, prepare for this one because University Students have had it all.
Yes, there's always going to be a good deal that you don't care to get through, or have trouble understanding, or wish to understand. You'll get distracted, you'll want to move away from it, and you'll want to do somthing else. That's human, it's normal. There's a multitude of ways around this however that will make things much easier.
First off, it's good to have at least one distraction going on in the background, preferably one that doesn't require visual attention. That means either a radio, an MP3 player, a CD, or a youtube playlist. If you have something else that your mind can wander back to, it becomes easier to wander back and forth between study and brief relaxation. Also, there have been studies that show that you can tie what you learn to music and sound, so that you can better recall the information when you hear that stimulation again.
Also, make sure you have all possible needs covered near your desk, that way you don't have to leave it. Some dry snacks, water, tissues, book, paper, pencil sharpener, trash can. Bathroom.... well, you're not going to have much option for that one.
If you want to have hard focus on your subject, then you need to also provide yourself with a hard reprieve. Say, 30 minutes of study, and then one round of Plants vs Zombies, something that gets your attention running again and requires thought and skill to accomplish so that you're still in the mood set when you return to study. I recently got Picross for my 3DS, a puzzle game, and that does the job pretty well.
A couple more things: It's best to study roughly 24 hours from the time of your test rather than studying to excess at night, you'll be more likely to retain the information that way and recall it the next morning. Writing down something helps you remember more than just reading, because it gets you involved with what you're working on. Lastly, whatever your subject, you can always find an interesting thing to relate it to. For example, circuitry analysis: How much resistance would have to be built up within a Fallout 2 laser rifle in order to fire an appropriate amount of flesh searing heat? Physics, if body 1 is being met with body 2, and body 1 fires a bullet with mass equivilent to a car, what is the force being exerted against body 2 from a distance of 20 feet? Math, this character is storing one rifle and 2000 bullets at a weight of 1 ounce each, with a size roughly filling a 3:1 ratio box at length of 1.5 inches. Determine an appropriate sized container to carry all of it.