The first half of that GIF was a real actor, with a prosthetic skin flap on his chest that would hide the tube of blood that was spurting out of his neck area. The second half of that was most likely a dummy, although it could have been CGI or a combination of a dummy and CGI. There is always a cut in the film just before the head comes off (note how the view goes from the guy with the swords to the guy just as he's losing his head).
A top-notch Editor gets paid big bucks to make sure you can't tell when that cut happens. A low-budget Editor will probably not do as good of a job, or doesn't have the editing tools necessary to make the cut as seamless. If you've ever seen any movies where people get hit with a very fast-moving car or truck, you'll know almost immediately how good that Editor is.