Both are types of lymphocytes which, in turn, are white blood cells or leukocytes.
They compliment each other, forming the branch of the immune system called the acquired immune response.
Basically put, they aid in the elimination of invading pathogens and create immunity at the same time.