In my experience, procrastination never simply occurs magically on it's own. What I mean by this is that if we legitimately want something done, it gets done. When we procrastinate, it is because there is an unusual incentive avoiding work until the last possible minute.
One common example of this is in the form of something called self-handicapping. Essentially what happens is a person holds a fear of failure. More than anything else they don't want to see proof that they are a failure at life. As a result, when they get an assignment they are not confident on, they will subconsciously push it off until the very last minute. The idea being that if they do poorly on the assignment, it will be because they did not have enough time, rather than their skills were not up to par.
For procrastination, my experience is that the best process is to identify, understand, substitute, and reinforce:
Identify: What belief or fear could be encouraging you to procrastinate. What do you gain by putting off tasks until last minute. When you physically muster all the willpower you can into doing an assignment on time, what worries, fears, or tendencies pop up? Eventually, you ideally want to come to a conclusion like the one above, where the base fear is "I'm a failure". Don't be afraid to also ask people close to you for feedback as to what they notice being motivators for your behavior.
Understand: Understand exactly how your current coping mechanism of procrastination both helps and hurts you. In the above example and probably in your own, it would be hurting you because it is obviously affecting your grades, productivity, and maybe even your ability to enjoy yourself. The way it helps in the above example, is it protects the person's self esteem. By at least not failing unintentionally, the person can feel that to some degree they aren't the failure could see themselves being.
Substitute: Once you understand the situation inside and out, find a new way of being that both fulfills your current need for productivity, good grades, etc. and your old need (in this example feeling like not a failure). An example of a new way of being would be to believe something like that you are a successful person as long as you are putting your full heart into what you are doing, and the reason for this is because success come from falling off the horse and getting back on it, not from never riding the horse in the first place.
Reinforce: Whatever new belief or way of being is, it will sound very appealing to you to hypothetically believe, but will sound like a load of absolute hogwash to you. We don't just magically believe new things, so you'll need to slowly reinforce your new way of being. You do this by finding small goals of little things that are of minimal effort to reinforce this new belief. An example would be as simple as finding evidence of people who had to fail to succeed such as Michael Jordon not making his high school basketball team, or Einstein being considered mentally handicapped as a child due to not talking until he was four.
The whole above process is very long and very slow, taking easily months to years depending on the difficulty, but it's incredibly worthwhile. I recommend making smart goals and pacing yourself, otherwise the process can get aggravating.
More on smart goals here.