I am reading wikipedia article on the stacks https://en.wikipedia.org/wiki/Stack_(mathematics) and it contains assertion:
The intuitive meaning of a stack is that it is a fibred category such that "all possible gluings work".
How to understand this? There are many references (e.g. https://link.springer.com/book/10.1007/3-540-27950-4) that say:
Roughly speaking, a stack is a sheaf of categories.
i.e. stack as sheaf is the functor from category into category of sets or functor into general category (in the case of stack).
So - in what sense stack as functor is also a category (and fibred category as well)?
I can understand the category of functors, but I am confused by the notion functor as category.
Regarding fibred categories, I am reading excellent tutorial https://bartoszmilewski.com/2019/10/09/fibrations-cleavages-and-lenses/ and I would love if similar explanation would be available for stacks as well.
In spite of grammatical appearances, a "fibred category" is not a kind of category; it's a functor with some special properties, as a decent definition of "fibred category" should make clear. So there's nothing to understand as far as stacks being categories; they're just not.
So let's call a "fibred category" just a fibration, to avoid this kind of odd terminology. What's probably more useful to see is why a (pseudo)functor $E:\mathcal{C}^{op}\to \mathbf{Cat}$ gives rise to a fibration $p:\mathcal{E}\to\mathcal{C}$. The key here is the Grothendieck construction. Given $E$ as above:
It's not hard to check, then, that the operation acting by the first projection $p$ on objects and arrows of $\mathcal{E}$ is actually a functor and, moreover, a fibration. Here the cartesian morphisms will be those $(f,\alpha)$ in which $\alpha$ is an isomorphism. Furthermore, $p$ turns out to have a choice of cleavage, and gives rise to a canonical pseudofunctor $\mathcal{C}^{op}\to\mathbf{Cat}$ that is equivalent to $E$. So we can pass back and forth between the two different forms of this object as is convenient.
I'm glossing over considerable detail here, especially at the end, since there's some mildly fiddly 2-categorical stuff needed to make this precise, but hopefully this makes it a little clearer.