There seems to be two separate issues here. If it is not draining presumably the pump is not spinning and/ or the drain pipe is blocked with something so water cannot exit the machine. You also say it won't spin - that would normally be a separate issue - but perhaps with modern electronics it is connected?! Does the drum turn AT ALL? If it doesn't then maybe your drive belt has broken/ come off? If it does turn normally on the wash cycle but simply won't spin - that's different.
If I were you I'd start by draining the machine manually via the filter (usually at the front bottom). You're going to have loads of water coming out so have a shallow tray and let a little out at a time! Then you can disconnect it, pull the machine out and get access to the bottom of it where you will find the pump, hoses and filter housing. Check all these are clear. If you can see the circuit board look for any evidence of water damage / short circuits. If you feel confident you could remove the pump and test it off the machine. If you haven't cured it by then you are probably looking at an electronic problem - either sensor or component. Good luck
Richard
December 2008