What is definition of "adversary"? And what do they do? Currently I am writing my last assignment about secret sharing. But I don't clearly understand adversary. I know this is a fundamental concept in secret sharing. But I couldn't find references that clearly definite adversary. Moreover, what is passive attack and active attack? What are the differences between them?
Formally, an adversary is simply a (probabilistic) algorithm, which we usually assume to run in polynomial time in $n$, the security parameter.
From a more intuitive point of view, an adversary is the model of an attacker on the real life, since every attacker follows an strategy that boils down to an algorithm.

Now, at a high level, a passive attack is an attack where the adversary simply "sees" the information (encrypted data, signatures, etc.) and try to find the secret data from the information gathered. By contrast, in an active attack, the adversary has the ability to "interact" somehow (for instance, by encrypting messages of his choice or even decrypting messages of his choice). 

Of course, each one of these notions has its formalization (e.g. Computational indistinguishability, CPA-security, CCA-security).