I think I figured it out.
I created a "modules" directory.
I downloaded the archived module and placed it in my "modules" directory and extracted it.
The first part of the module name has to be a directory and the second part of the module name has to be a .pm file within that directory.
So it would look like this: modules/HTML/TreeBuilder.pm
I added use lib 'relative/path/to/modules/direcory' to my script (before use HTML::TreeBuilder, needless to say).