It defends itself by launching spikes, but its aim isn’t very good at first. Only after a lot of practice will it improve.
When threatened, it attacks by shooting a barrage of spikes, which gives it a chance to escape by rolling away.