How to reduce/prevent the Wither effect?

Solution 1:

Based on this table of status effects from the wiki, a potion of regeneration or a golden apple will give you regeneration for a short time, which should heal hearts over time faster than you lose them from the wither effect (1 gained every 25 ticks from the regeneration versus 1 lost every 40 ticks from the withering).

Also, drinking a bucket of milk can remove all status effects.

Solution 2:

Use potion of healing to heal you but damage withers or wither skeleton or zombie or skeletons