What is the difference between IFHP and OHIP and which one should the refugees apply for?

The short answer is both; sponsored refugees will have coverage under both programs. In general, resettled refugees are eligible for the same health coverage from the province or territory of residence upon arrival in Canada as every new permanent resident.

Interim Federal Health Program (IFHP)  is for resettled refugees, protected persons, refugee claimants, and victims of human trafficking. People detained by the Canada Border Services Agency (CBSA) are also covered. 

For refugees chosen to resettle in Canada, the IFHP will cover some pre-departure medical services. This can include:

According to the IRCC website, basic coverage is provided only until the refugee qualifies for provincial or territorial health insurance. Supplemental and prescription drug coverage is provided as long as they receive income support from the Resettlement Assistance Program (RAP), or until the refugee is no longer under private sponsorship.

Once they receive health insurance from the province or territory that they settle in, the IFHP will continue to provide coverage for supplemental services, like dental and vision care, and prescription drugs for up to one year.

For information about the Ontario Health Insurance Program (OHIP), the OHIP Card and how to apply for it, you can read this section from Settlement.Org.