Emergencies such as lack of heat in winter should be fixed very promptly. Collect evidence to help your case. If your case ends up in court, you want to be able to show the judge what the problem was, that you gave the landlord notice, and that the problem was not fixed within a reasonable time. Pictures and witnesses are important. If repairs are needed, it is also helpful to get a builder, plumber, or electrician to evaluate what repairs are needed and how much they will cost.
Every case is different.
If you move out, write to your landlord to give your moving date and to say that you are moving because of the housing conditions that were not corrected. Save a copy of your letter. Reduce the amount of rent that you pay, because of the problem. It is a good idea to keep the rent that you withhold in a separate bank account, so that you can pay the money later if a court decides you owe rent. Then, if your landlord tries to evict you and the judge rules that the housing conditions were not as bad as you thought, you will be able to pay the rent the judge says you owe.