Direct impingement gas system ( DI ) is a completely gas operated system . some of the gases when fired down the barrel are redirected through the gas block back down the gas tube and in to the gas key /BCG and that cycles the next round . A gas piston system uses a piston to push the BCG back to cycle the next round . It is similar but very different . The gases get redircted through the gasblock same as a DI but instead of going all the way down the gas tube it's blocked by the piston . The piston is then pushed back through the upper receiver cycling the BCG . The piston system never throughs hot gases and fouling in to the upper receiver and BCG . The piston system will keep the bolt carrier and upper receiver cleaner while in use but has more components to fail . The BCG and gaskey are just a part of the over all systems . although the BCG for each system are not interchangeble as far as I know .
Here is a video showing how each work
Before you ask which one is better, DON'T. All it will do is spark an argument .