If you have worked for more than one year, you will have built up sufficient rights to receive ´paro´ / unemployment benefits. You will be covered for healthcare while you are receiving paro.
Guide on how to apply for paro or unemployment subsidy
When your paro ends, you need to stay registered as unemployed and looking for work. You will be able to apply for unemployment ´subsidio´ one month after your paro has stopped. If accredited, your health cover will continue.
After that, you should continue to be covered for 120 days and then, if still not on new contract, automatically transfer to the ´sin recursos´ system for continued health care cover, but we advise to check on that with the INSS once the 120 days are up as it´s very likely they will only accept applications from those that were registered residents since before April 2012, when the law changed.
If you quit a job while contract is still valid, you won´t have access to any built up unemployment benefits entitlement and thus no cover for healthcare as described above.