Give Someone A Hard Time Meaning

(idiomatic) To tease, kid, or rib someone.

Example:   During WWII, German troops gave the Allies a hard time in Italy, but eventually the Allies broke through.
  He's usually pretty good-natured when the children give him a hard time about his bald spot.