Friction arises when two surfaces are in contact with each other and are pushed in a way that makes the surfaces want to slide relative to each other. Note they don't have to be sliding. Air resistance is also a form of friction.
This concept trailer from OpenStax talks about drag.