If you live in MA you'll need to get a state, pet spider permit.
Before you can get the permit, you'll need to take a pet spider safety course taught by a certified pet spider safety instructor.
Then you will need to submit your course certificate to the local chief of police along with the proper application, the $100 non refundable fee, and a proper reason for wanting a pet spider. You will then begin the waiting period for your permit to be issued. The local chief will submit it to the State Police where a background check will be performed and then they will send it off to the state capital where you will be entered into the Criminal History Systems Board computer as an applicant for a pet spider permit.
Keep in mind that your application must, by law, be acted on in 40 days or less, but it could be up to 6 months or so before you will hear if you've been approved for a right to keep a pet spider.
When the application has been returned to the Chief, he can still deny you your pet spider permit if he, for any reason decides you are an 'unsuitable' person to keep a pet spider. Before you can actually get a pet spider, you must register the purchase with the CSHB.
If you are lucky enough to get such a permit, you agree to keep the pet spider under lock and key in an approved manner.
Should the pet spider somehow get loose, you can, and most likely will be arrested and charged for improper storage of a pet spider.
You don't live in MA? Well, open the window and let it in, or squash it and not worry about it.