You need to serve the landlord with a notice of intent to quit the premises, stating exactly why you are taking this step. Then you should send the notice "return receipt" through the post office so you'll have proof of service.
Now, you need to contact your local housing authority and report the conditions you reference. Again, be sure you have everything in writing, and present this to the authorities along with the return receipt.
If you gave a security deposit, you should demand that it be returned immediately. The housing authority will help with that.
It does help to document all items with photographs. For your own health, you do need to move out asap.