What is the difference between "family" and "set"?

Solution 1:

Strictly speaking, a family is a function $I \to U$, where $I$ is an index set and $U$ is a universe that contains the members of the family.

Strictly speaking, a set is not a family indexed by itself: it's either the image of the family, if the members are the elements, or the union of that family, $\cup_{x\in X} \{x\}$, if the members are singletons.

Solution 2:

A family is indeed a set, and it is defined by the indexing -- as you observed.

Just as well every set $A$ is a family of the form $\{i\}_{i\in A}$.

However often you want to have some property about the index set (i.e. some order relation, or some other structure) that you do not require from a general set. This addition structure on the index can help you define further properties about the family, or prove things using the properties of the family (its elements are disjoint, co-prime, increasing in some order, every two elements have a supremum, and so on).