I recently started a course in set theory and it was said that a model of set theory consists of a nonempty collection $U$ of elements and a nonempty collection $E$ of ordered pairs $(u,v)$, the components of which belong to $U$. Then the elements of $U$ are sets in the model and a set $u$ is interpreted as an element of $v$ if $(u,v) \in E$. It was also said that $U$ can also be a set and then $E$ is a relation in the set $U$ so that the ordered pair $(U,E)$ is a directed graph and reversely, any ordered graph $(U,E)$ can be used as a model of set theory.
There have been examples of different models now where some of the axioms of ZFC do not hold and some do, but the axiom of extensionality has always held and I for some reason don't seem to comprehend enough of that axiom and its usage. Can someone tell an example of some collections $E$ and $U$ where the axiom of extensionality wouldn't hold?