You haven't really given us enough information to get focused help. If the
firewall is turning off, there is a reason. It could be that your computer
is infected with malware or it could be that you have third-party security
software installed that has its own firewall. McAfee and Norton are
examples and they will disable the Windows Firewall automatically. This is
by design.
So please tell us a bit more about your computer, what security/antivirus
software you have installed, and what changed between the time things
worked and the time they didn't.