My friend asks me "What is this in your ears?" and I answer "It is actually earphones" Is it correct? Do I refer to them (earphones) as for a group of objects?
Yes, "it's my earphones" or "it's actually earphones" are both perfectly valid responses in this case. No, that "it" has nothing to do with "earphones". "It" there is called a dummy pronoun and it is being used as the subject of the sentence. You need it because a normal sentence in English should have a subject and a predicate part:
it - subject
is my earphones - predicate
The sole purpose of a dummy pronoun is to play the role of the subject of the sentence. It does not do anything else and it does not refer to anything. In the case of your sentence, "it" does not refer to "the earphones". "It" is just sitting there and being the subject of the sentence. It's there only for the purposes of syntactical completeness.