Statutory Maternity Pay?

Bit confused with all of this so hoping someone can explain! How much maternity leave do you actually get? 
My boss told me that you can take up to 52 weeks off but someone else has said that not all of this is paid time off. So my question is, how long do you actually get paid for? I don't want to leave it until one day where I don't get any money and I'm in a situation!
Thanks in advance!