I've been to a bunch of comic con where an artist that works or worked for either the big to have sketch books that they sell and a bunch of them have sketches and drawings with characters from the big 2 companies. They are selling their art of drawings of Batman, Spider-Man and the like.

My question is, how is this legal? What copyright issues are there. I've seen at the end of a sketch say copyrights credited to the companies. Is there an understanding with the artists and the company? Are there rules that they have to follow, like not drawing nudes or whatever?

I'm curious.