If you go aground, the best way off is to reverse slowly back the way you have come. Going faster in forward gear will usually result in you sticking tighter! Remember the slower the propeller revolves the more water you will have underneath the boat.
It can be quicker not to use the engine at all - but to push the stern off with the boat pole and then reverse into deeper water before straightening up.
Don’t have your crew standing at the end that’s stuck - move them away and you’ll gain a couple of inches depth straight away!
Other boats - If you come across a boat grounded, and it is safe to do so, stop to give them room for manoeuvre. Otherwise pass very slowly so as not to force it further aground. With skill and experience you might even offer to pull them off!