A xfail means that you expect a test to fail for some reason. A common example is a test for a feature not yet
  implemented, or a bug not yet fixed. When a test passes despite being expected to fail (marked with
  pytest.mark.xfail), it’s an xpass and will be reported in the test summary.

One of the important differences between the two is that skip doesn't run the test, and xfail does. So if the
code that's buggy causes some bad state that will affect other tests, do not use xfail.
Implementation