amok: Unfortunately all learning theories says that when you are not interested in a subject it is difficult to learn it. It is just how we are hard-wired. You can surface learn subjects of no interest, i.e. memorise facts and data with work (coffee) and mnemonic techniques, but without interest it is almost impossible to internalise them and transform the data into 'knowledge networks', which is usually considered learning as opposed to memorising.
In this case there is a difference between motivation (I like this, I want to learn it) and motivation (I will fail if I don't learn this). The first comes naturally. If you really want to learn the subject, you must find some aspect of the subject which is interesting to you, makes you want to know more, and then try to expend from there.
Years through the education system has taught me otherwise.
You can learn something that you have no interest in.
Why, just the other week, I learned CSS in a fair deal of depth even though I believe it's a piece of garbage that needs to be redesigned from scratch (some good ideas, but god awful implementation).
Anyways, my suggestion to the poster:
1) Do a lot of aerobic exercise (like running). Pant up energy won't play in your favor.
2) If it's school and you're angry, pick something that you can hit on, hit it hard with a baseball bat and imagine it's the kneecaps of whoever decided that learning what you are learning should be mandatory. It will help canalize your anger and ensure you're not too angry while you're trying to learn.
3) I'm assuming you're learning what you are learning because it will lead to a goal that you covet (even if that link is just paperwork that says that you learned it). Well, keep that goal firmly in mind.
4) Take frequent breaks from your learning. If you have something else that's productive that you can do and that you prefer, do it during those breaks. Otherwise, play a game or something (but be sure to use a timer).
5) Listen to music (something that doesn't draw too much attention to itself, but that is soothing in the background). It will help to ease the pain.
6) It's not mandatory, but having a gf or a pet (like a cat) that you can hug helps.
7) Make sure you get a proper nights' sleep before and after you learn. You will learn faster that way and internalize it better.