I have a very basic question, sorry for that )=. Let's fix some notation first. Let $ dz = dx + i \; dy $ . Given $f \in C^1$, $f : D \subset \mathbb C \to \mathbb C$, we define $df = f_x \; dx + f_y \; dy$.
Now, note that $f(z) \;dz = (u+iv)(dx+i \;dy) = ( u \;dx - v \;dy ) + i (u \;dy + v \;dx ) = w_1 + iw_2$.
Using this it's easy to see that if $F_j$ is a primitive of the form $w_j$ ($j=1,2$), then $F_1 + F_2$ is a primitive of $w_1+iw_2$. Using this, my book says that if $f(z)\;dz$ is closed , then $u,v$ satisfy Cauchy-Riemann $(f=u+iv)$. I don't understand why.
I think the missing ingredient is that $d(f\,dz) = df \wedge dz$. If you write this out in terms of $u, v$ and $x, y$ and their differentials, I think you should get the result. Note that $dx \wedge dx = 0$, $dy \wedge dx = -dx \wedge dy$, $dx \wedge (a\,dy) = a(dx \wedge dy)$, and so on.
Added. We can do this with your definition as well. [Although I would encourage you to learn about differential forms; it really pays off later on.] Fix $(x_0, y_0) \in D$. There's an open neighborhood $(x_0, y_0) \in D' \subset D$ and a $C^1$ (actually, it will be $C^2$) function $F\colon D' \to \mathbf C$ such that $dF = f\,dz$. If you expand this using $F = U + iV$ for $U, V\colon D' \to \mathbf{R}$ and equate the real and imaginary parts, and then further equate the coefficients of $dx$ and $dy$, then you'll get equalities like \[ U_x = u \qquad \text{and} \qquad U_y = -v. \] Since $u, v$ are $C^1$, this shows that $U, V$ are $C^2$. Now we can take partial derivatives and get \[ U_{xy} = u_y\qquad \text{and}\qquad U_{yx} = -v_x. \] By the equality of mixed partial derivatives [here we really do need $C^2$], we get $u_y = -v_x$ on $D'$.