This is explained in The Invisible Man - Revealed!, in short they did two shots, one with the main scene and one where the actor wore all black against a black background and combined the two.
Any portion of the actor that was to disappear was covered in black velvet. Then photographed against a black velvet backdrop. When combined with a separate shot of the normal set the illusion of invisibility was startling.
The Invisible Man - Revealed!
This is further explained in the essay below which also mentions a patent being filed for the technique.
John P. Fulton and Frank D. Williams are the men directly responsible for creating the ground breaking effects seen in the ‘The Invisible Man’ film. On the 23th of July 1916 F. D. Williams filed a US patent entitled ‘Method of Taking Motion Pictures’ which detailed a method of “taking motion pictures, and is especially adapted to produce a picture showing two or more objects in relative positions in which they have not actually been placed”
(F. D. Williams, 1916. Method of taking motion pictures. U.S. Pat.1,273,435)
This process was used and adapted as a base to create the majority of effects which illustrated a partly clothed or bandaged invisible character in the film. To achieve these effect sequences Rains or a double wore a tight fitting black velvet suit underneath any clothes which were to remain visible moving around the scene. The actor’s performance was then filmed on a black velvet backdrop; a second background plate was filmed and a double exposure was then used to seamlessly combine the two shoots together, this resulted in the black elements from the first shot, the valet suit and backdrop being replaced by the background film in the second shoot. This is a very early version of an effect today know as ‘green screen’, in modern times an array of different colours, most commonly green, blue and black are used depending on the backdrop and the colour of other elements in the scene for example if the screen is green heavy or an actor’s costume includes green, a blue backdrop can be used.
UK Essays, Technology In Invisible Man And Hollow Man Film Studies Essay