The Evap Canister is to pull the fumes from the gas tank so that they don't get vented into the atmosphere. The fumes get pushed into the canister by the natural action of the gas evaporating. The charcoal in the canister traps the fumes, but later on they get sucked into the engine while it's running at a higher rpm.
The lines get diagnosed via an Evap Pressure Sensor and the Evap Canister Vent Control Valve.
When the engine is running, the system will perform an evap leak check during certain times, like cruise speeds. It will close the Vent Control Valve on the canister, sealing the system up from that side. Then it will open the Purge Volume Control Valve (this is usually a duty-cycle solenoid but the computer will ground this out to open the system up to engine vacuum) and monitor the pressure sensor and see when tops out. Closing the volume control valve should lock vacuum into the evap system for a short period, calculated by the computer, depending on the fuel temp, fuel level, outside temp, etc. and the computer then determines if there's a leak. Figuring how fast the system loses vacuum over a period of time will determine if the system has a small leak or a gross leak. Cracked vacuum lines, a plugged purge line (due to the charcoal canister breaking up and throwing charcoal into the purge line, common!) or a bad vent control valve (also common due to rusted pintle shafts) can all cause either codes.
That's how the system works to diagnose the Evap system. Knowing how it works is necessary to diagnosing the system. I use a Mighty Vac with a special attachment to diag the systems while telling the computer to close the vent control valve (the purge volume control valve is normally closed). Then I monitor the pressure sensor, seeing if it drops off, doesn't go up at all or holds pressure. If it doesn't go up at all, I look for a line broken, cracked or off. Or I look at the purge volume control valve, pulling off the line going into it from the canister (it will have the green cap on it, on the driver's side, in the engine bay, goes into a solenoid). Pull the line off and look for little charcoal pieces inside the line, if it's there, the purge volume control valve will need to be replaced, along with the charcoal canister.
To check the vent control valve, you will need to pull the connector off, apply 12v directly to the valve and listen to hear if it clicks. Even if it does click, then you'll want to blow through it, with the voltage applied to see if it will actually seal. If it doesn't, then you will need to replace it.
It can be tricky, but with checking a couple of things, you can probably fix it with a little bit of diagnosis.
Sorry for the long windedness, I get that way.