One example of evolution in recent history is that of the apple maggot in North America. Apple maggots, as their name suggests, eat apples, but this has not always been true. They used to feed on a plant called hawthorn (and were called hawthorn maggots), but in the 1700s when apples were introduced to North America some hawthorn maggots started to feed on apples.
Nearly identical as adult flies, the apple maggot
evolved from hawthorn maggots when apple trees were introduced to North America.
This shift in diet separated the maggots into two groups, hawthorn maggots and apple maggots. Both groups are still biologically very similar, but
because of their food preferences they will no longer breed with one another.