The main difference is in context:
'to guarantee' has legal implications behind it.
For instance: if a television comes with a "two-year guarantee" then it has to last two years. If it does not last two years and breaks down, then the company is obliged to give you a new one as they have officially and legally stated that they have guaranteed the television will last two years. In that sense, 'to guarantee' has a stronger meaning than 'to ensure'
'to ensure': is more personal and more of a gesture of intention. If someone were to say: "I ensure you that the task will get done", it implies that they will do everything they can do complete the task. However, if they do not get the task done, there are no legal implications behind it. The context of this verb is more casual.
'to promise': is also a similar verb. However, this one has more of a moral context. If "I promise you that the drums will sound", I am taking moral responsibility for the event of the drums sounding. If the drums do not sound then this implies that I am sinful, dishonest and bad as I have broken a promise.
All of the above are used pretty much interchangeably in everyday speech so it's not wrong if you use one instead of the other in a normal conversation. However, if you're dealing with lawyers and prosecuting someone etc. then wording such as "guarantee" is quite important.