According to the news site my husbands reading many NHS computers run Windows XP. There's been no security updates for it for years, Microsoft stopped supporting it three years ago.
It's most likely that this is all due to someone opening a dodgy email on a networked computer and it's spread like wildfire.
Trouble with ransomware is that no one has found a way to beat it yet, you either pay or wave bye bye to your data. Let's hope the NHS take regular backups and those are kept securely.