A training example is one input paired with its correct output. A dataset is a collection of such pairs, and its size is the number of examples it contains.
One example in the spam filter
Consider a single email whose subject is "Claim your prize now" and whose body contains a suspicious link. If a person has already reviewed it and marked it as spam, then this email and the label "spam" together form one training example. The email text is the input; the word "spam" is the correct output. Ten thousand such emails, each with its own label, form the dataset the model learns from.
The correct output is often called a label. A mislabeled example teaches the model something false, so the accuracy of the labels is part of the data's quality.