I was fighting against 3 human (A,B,C). The first one (A) was attacking just in front of me, the second (B) was 10 feet at the left side but was engaged with my partner, and the third (C) was 15 feet directly behind the first one. C tried to shot at me with an arrow but A was (as I supposed) creating a half cover for me. Does it work like that or not?
Yes, you have cover
Per PHB 196, the rules of cover state:
A target with half cover has a +2 bonus to AC and Dexterity saving throws. A target has half cover if an obstacle blocks at least half of its body. The obstacle might be a low wall, a large piece of furniture, a narrow tree trunk, or a creature, whether that creature is an enemy or a friend.
The covering creature in your situation is medium, so the exact degree of cover depends on the size of your character but, RAW, your character has at least half cover.