There are not 100% risk free but they are close to being risk free. Risk free basically means that the risk of default (and therefore the risk of you losing your money) is remote. It’s not that this would never happen but there are quite a few mechanisms in place that can prevent a whole country for going bust.
It does not mean that it has never happened though. Even the US has gone bust 3 or 4 times (one or twice in the last century).