I don’t know exactly how it is implemented, but if I had to guess, it is probably just metadata in the file. I know that when I print out the 2D drawings I make, it puts text in the bottom corner with something to the effect of “This was made with the educational version of Solidworks, Not for commercial use” or something like that. I expect something similar if you tried to open a file made on the educational version on the commercial version, there would be something similar on the screen. Not sure though, since I only have the educational version.
Sorry, I don’t have the slightest idea.