The drive cycle varies depending on the vehicle model and year. Generally, you will need to drive the vehicle for at least 20 minutes, including a mix of city and highway driving. You will also need to make sure that the vehicle reaches operating temperature and that the fuel tank is at least half full.
If you have reset the readiness codes and they come back on, it means that the problem has not been fixed. You will need to take the vehicle to a qualified mechanic to have the problem diagnosed and repaired.