When you ensure that something will happen, you guarantee it. All that homework will ensure that you have no time for fun this afternoon!
Ensure comes from the Old French en- "make" plus seur "sure," and that is exactly what it means today - "to make sure or certain, to guarantee." If you ensure success or someone's safety, you are guaranteeing it. Make sure you can really come through with something before you ensure it!