Some time ago I wrote an article about running aground, here’s the whole thing: http://www.saltyjohn.co.uk/resources/Running%20aground.pdf
And here are the main points:
1. Recognise that you’re aground as soon as possible and stop forward motion. The only direction in which you know for sure there is deep water is that from which you have come.
2. If motoring, go into reverse immediately. If sailing, get the sails down, check for lines in the water and start the engine, then go into reverse. Be aware that your rudder is vulnerable when backing up in shallow water.
3. If this fails, limit the damage by getting an anchor out to windward. If possible orient the boat to provide the most protection from wind and waves.
4. Reduce draft by heeling the boat. A very effective method is by pulling on a masthead halyard. Another method is putting weight onto the end of the swung out boom; a crew member or a flooded dinghy being the main candidates. Motor or tow the boat off into deeper water.
5. Seek assistance from the professionals, or hail a passing Good Samaritan.
6. Running your engine in shallow water and when aground churns up the bottom: Check your raw water intake strainer; if it is filled with sand and mud check your raw water pump impellor for damage.