Short answer: “Anyone” and “anybody” mean the same, perhaps with one exception. Long answer: Some authors ascribe slightly different meanings to the two words, but this does not seem to be supported by their modern usage, although there seems to be one case where they are not completely equivalent.
Both “anyone” and “anybody” can be used to ask questions,
Does anybody have a pen?
in general statements,
Anybody can learn to draw.
and in negative sentences, such as
I don’t know anybody there.
If there were slight differences in meaning, they should be revealed by differences in collocations (words commonly used in combination with the given word), just like is the case with the words “intensive” and “intense”, for example.
I have examined the collocations of “anyone” and “anybody” in an English language corpus, and there seem to be virtually no differences between them at all. They are used in the same contexts and combined with the same words, and while “anybody” is, in general, less common than “anyone”, the ratio seems to stay relatively constant for the collocations.
The only oddity I have noticed is that “anyone interested” is significantly more common than anybody interested, in a way that is not explicable by the general ratio of the number of occurrences of “anyone” and “anybody”. In fact, “anyone interested” is exceptional also in that it has always been more common than “anybody interested”. Take a look at the following graph showing the relative frequency of “anyone interested” and “anybody interested” in English literature:
and compare it with the corresponding graph for other typical collocations, such as “anyone else” and “anybody else”:
(Please note that the graph does not indicate that the spoken form of “anybody” was more common than “anyone” in the past; both “anyone” and “anybody” used to be spelled as two words (“any one” and “any body”), and when both variants are taken into account, it turns out that “anyone” and “any one” have always been more popular than “anybody” and “any body”.)
Other collocations of “anyone” and “anybody”, except “anyone/anybody interested”, follow the same pattern: “anybody + something” used to be more common until the early 20th century, when it was overtaken by “anyone + something”.
Probably the main reason is that “anyone interested” is used in notices such as, “Anyone interested in participating should call [...].” Apparently, using “anybody” instead of “anyone” is not common in this context.
In conclusion, “anybody” and “anyone” are almost completely interchangeable, but “anyone” is probably a somewhat safer option because it is more common in contemporary English. One exception to their interchangeability is the phrase “anyone interested”, where replacing “anyone” with “anybody” seems to be rather unusual.