This is quite tricky because there is no universal definition that perfectly captures the term. But the legal test most often cited, covering most instances of defamation, is: “Would the words tend to lower the plaintiff in the estimation of right-thinking members of society generally?”
The essence of this test, which derives from a 1936 English case, is that a defamatory publication is one that contains a "sting" or "barb" (or "imputation" more formally) that would tend to cause ordinary reasonable people to think less of someone as a result of reading it. (Classically, a plaintiff did not have to prove that people actually thought less of him or her; this may be changing with the fledgling element requiring plaintiffs to prove serious harm.)
Accordingly, it is defamatory – to varying degrees – to make disparaging or derogatory remarks or suggestions about somebody: to say that they are, for example, criminal, corrupt, a crook, a liar, a cheat, a fraudster, a paedophile, deceitful, dishonest, exploitative, hypocritical, lazy, incompetent, unfaithful, immoral, disloyal, a coward, a drunkard, or are otherwise worthy of anything ranging from disapproval, ridicule or mockery, right through to odium, hatred and contempt.
The basic test to consider is: “As a result of the publication, is it likely that ordinary people will think less of [X]?”
However, there is also a less common form of defamatory statement: one that is likely to cause ordinary reasonable people to shun or avoid a particular person.
As such, it is defamatory to suggest that somebody has generally undesirable things about them: that one is, for example, diseased, smelly, insolvent or bankrupt. The difference here is that such characteristics might have nothing to do with a person’s legal, moral or ethical shortcomings – they might simply reflect a person’s unfortunate circumstances. Nonetheless, such suggestions may be defamatory if they are likely to adversely affect the person’s reputation or standing by, for example, causing them to be uninvited to a party, or not advanced a loan.
The test to consider for this kind of defamatory statement is: “As a result of the publication, is it likely that ordinary people will shun or avoid [X] in some way or another?”
And, yes, some statements will be defamatory by either test – someone exposed as a paedophile will be both thought less of, as well as shunned and/or avoided, by ordinary people.