A stack is usually given in terms of:
-A category $F$ fibered over another $C$ such that the functor $Hom(x,y), x,y \in F(\alpha), \alpha \in C$ is a sheaf
-The descent data are effective.
There is an equivalent definition, using the Grothendieck construction, which is a correspondence between fibered categories and pseudofunctors in $Cat$. Given this correspondence a stack becomes a (contravariant) pseudofunctor such that descent is effective.
Now, with this definition in mind it seems obvious that a stack is a generalised sheaf. But here is my doubt:
When defining a sheaf $T$ over a space $X$, is not unusual to see the following diagram (naively)
$ T(X) \rightarrow T(U) \stackrel{\longrightarrow}{\longrightarrow} T(U \cap U)$
While, saying that descent data are effective is like asking a similar diagram, but there is the difference that here descent satisfies cocycle condition, something which is naively in $U \cap U \cap U$.
Recalling that (for example) locally constant sheaves automatically satisfy the cocycle condition because of their correspondent covering spaces do.
So my question is, at the light of my interpretation, the cocycle condition seems to me the only obstruction to the fact that a stack is a generalised sheaf. Am i wrong? Every sheaf trivially satisfies cocycle condition?
I am not sure I understood the question, but will try to say things that point you in the direction of further topics.
The following sentence that Qiaochu wrote is spot on:
The difference between "presheaves" and "sheaves" is some form of descent—i.e. being able to glue global gadgets by providing local gadgets together with evidence that things are "the same" on overlaps.
As you deal with things having a greater degree of flexibility (more formally, "category level"), the nature of this "evidence" becomes more complex. Two elements of a set are either the same, or not. Two objects in a category can be isomorphic in many ways, and the "evidence" refers to the specific isomorphisms which must then be compatible (i.e. the cocycle condition).
I can say two things that may be enlightening if you have not heard them before.
$\text{}$1. This does not stop after two steps, and there is a uniform formulationthat works up through infinity-categories—the notion here is of the Čech nerve as a simplicial diagram (so all the spaces $U \times U \times \ldots \times U$, where $\times$ denotes the fiber product over the base, with a natural simplicial structure).
In that case writing out the analogs of the cocycle condition is impratical, so we do not do it. Instead, the sheaf condition is that$$F(X) \to F(U) \to F(U \times U) \to F(U \times U \times U) \to \ldots$$($\ldots$with many more arrows, see "augmented cosimplicial diagram") is a limit diagram in a suitable infinity-categorical sense. (There is also a fibered category analog for when we want to be rigorous.) In the case when the "target of $F$" is something like infinity-categories this has a nice interpretation as an object of each $F(U^{\times_X n})$ together with a certain collection of morphisms between their images under various functors.
$\text{}$2. The above definition is always true. That is if you are dealing with sheaves of sets/categories and you ask that the above be a limit diagram you get the correct notion of descent. The higher conditions are automatically satisfied because sets/categories only have so much "flexibility" in how they can be "the same". You can get the general gist by convincing yourself of this in the case of an ordinary sheaf or a category.