I am trying to understand how sets are generally defined using ZF set theory. I've been reading about ZF set theory.  Using the book, Introduction to Set Theory by Hrbacek and Jech it starts with these axioms (informal definitions here).
Axiom of Existence: There exists a set which has no elements.
Axiom of Extensionality: If two sets contain the same elements they are equal.
Axiom Schema of Comprehension: Let $S,T$ be sets. Let $x$ be an object and $P$ be a property of $x$. Then for any set $T$ there exists a set $S$ such that $x ∈ S$ if and only if $x ∈ T$ and $P$ is true.
Axiom of Pair: Given any two sets $x$ and $y$ there exists a set $S$ such that $x,y ∈ S$.
Axiom of Union: Given a set $S$ there exists a set $T$ such that $x ∈ T$ if an only if $x ∈ X$ for some $X ∈ S$.
At this point I am curious how ZF actually gets sets that are not based off the empty set.  That is, we know the empty set exists by the Axiom of Existence so we can have two sets $A = \emptyset, B=\emptyset$.  By the Axiom of Pair we can have set $C = \{A, B\} = \{\emptyset, \emptyset \}$.  However, how would we get a set such as $D=\{\text{Apple}, \text{Pear}\}$.
Would we have to use the Axiom Schema of Replacement to actually bring this set into existence?  This would allow us to create a mapping between the sets C and D.
 A: $\mathsf{ZF}$, and its many variants, describes what may at first appear to be a quite limited mathematical universe. Most obviously, the axiom of Extensionality says that every object is determined entirely by its elements. In particular, this rules out urelements or atoms - objects which don't have any elements, but aren't $\emptyset$. Presumably this includes things like "Apple," within which $\in$ plays no role.
However, much more is true. In a precise sense, $\mathsf{ZF}$ proves that everything is "built from" the emptyset: via Foundation and Replacement, everything is in some (possibly transfinitely) iterated powerset of $\emptyset$. Phrasing this precisely requires us to first develop the basic theory of ordinals, which is nontrivial so I'm skipping it in the interests of brevity, but the basic idea is just that according to the $\mathsf{ZF}$-axioms, everything  looks like nested curly braces.
This may seem to contradict the standard maxim that $\mathsf{ZF}$ can implement all of mathematics: where, for example, is $17$ in a model of $\mathsf{ZF}$? The key here is the word "implement." Basically, you should think of the $\mathsf{ZF}$ axioms as describing a context which is "ontologically narrow" in the sense that there is really only one type of thing, yet surprisingly expressively powerful. For example, the standard implementation of the natural numbers in set theory is via the finite ordinals:

*

*An ordinal is defined as a hereditarily transitive set, and the successor of an ordinal $\alpha$ is defined to be $\alpha\cup\{\alpha\}$.


*An ordinal is finite iff it is an element of the smallest ordinal which is itself closed under successor (intuitively, this is the first infinite ordinal $\omega$).


*Addition and multiplication of ordinals can be defined by transfinite recursion; on the finite ordinals, this winds up producing a copy of $\mathbb{N}$.
Basically, rich non-set-flavored structures enter the $\mathsf{ZF}$-world by coding procedures which are often tedious and annoying but get the job done. One "Platonist fable" we might tell at this point is the following:

Within the whole mathematical universe, there is a particular region $V$ consisting of the "pure sets" - basically, all the stuff we can build from $\emptyset$ via a few simple set-theoretic operations. The collection $V$ of pure sets considered on its own satisfies $\mathsf{ZF}$. While there may well be lots of mathematical objects not in $V$, everything in the mathematical universe can be "faithfully copied into" $V$ - so if you understand all of $V$, you understand everything.

While there's a lot to object to in the above, I think it may help clarify why $(i)$ $\mathsf{ZF}$ seems to say things we naively think of as false yet $(ii)$ that's not particularly worrying.
A: ZF set theory is a theory that deals with sets that are determined by their members: the axiom of existentiality states that $A = B \Leftrightarrow (\forall x((x \in A) \Leftrightarrow (x \in B)))$. The axiom of replacement only helps to construct sets with a great number of members and doesn't produce any objects that aren't sets. If you want to have objects that aren't sets, then you need to change the ZF axioms to admit what are known as ur-elements: objects with no members that are distinct from the empty set.  For your apples and pears, it is probably simpler to stick with ZF and use an encoding: $\mathit{Apple} = 0$ and $\mathit{Pear} = 1$, where $0$ and $1$ are defined in the usual way (as $\{\}$ and $\{\{\}\})$.
