is it necessary that curl of 2d vector is perpendicular to the plane. I am just confused, help me guys.
The question comes up, because we say that curl is either clockwise or anti-clockwise at a point.

In 2D, the curl can be thought of as pointing in the $z$ or $-z$ direction. But that's a bit contrived, because you can just think of it as a scalar. So if $F(x,y) = \langle M, N \rangle$, then $\nabla \times F = \frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}$.

Why is curl a scalar in 2D, but a vector in 3D?
It turns out that the standard treatment of multivariable calculus hides a few things. If you want to get into some deep water: we can think about things called "multivectors". A scalar is a $0$-vector, a vector is a $1$-vector, what would a $2$-vector (bivector) be? Just like a vector is like a line with a length, but no position, a bivector is like a plane with an area, but no position. If it helps to think of it as a floating parallelogram, do just that. This pattern extends up to $n$-vectors, where $n$ is the dimension of the space.
Let's play with $3$ dimensions because it's familiar. How many independent vectors can we have? $3$. How many independent scalars? Weird question, but $1$. For bivectors, it's $3$, and trivectors, it's $1$. This suggests a pairing, called the Hodge dual. Essentially, there is a vector space isomorphism between $k$-vectors and $(n-k)$-vectors.
So where was I going with this? Curl. The curl takes a vector field, and spits out a bivector field. But because multivectors aren't usually taught, we apply the Hodge dual implicitly. So in two dimensions, our bivectors become scalars, and in three, they become vectors. In four dimensions, they would still be bivectors.
In fact, all three of our multivariable derivatives are just one kind of derivative called the "exterior derivative", but all our silent Hodge dual-ing make them appear different. Scalar fields become vector fields (gradient). Vector fields become bivector fields (curl). And $(n-1)$-vector fields (duals of vector fields) become $n$-vector fields (duals of scalar fields) (divergence).
