To answer your first question, a more precise statement should be:
If $\bar{\partial}^{E}:\Omega^{p,q}\to \Omega^{p,q+1}$ is an operator on comple vector bundle $E$ satisfying Leibniz rule and $(\bar{\partial}^{E})^2=0$, then $\bar{\partial}^{E}$ defines a holomorphic structure on $E$.
For your second question, you need to relate $\bar{\partial}^2=0$ with the Newlander-Nirenberg condition.
This works in general (forget about the vevtor bundle structure), so let me start with an almost complex structure $J$ on a smooth manifold $M$, i.e., $J:TM\to TM$ is an operator such that $J^2=-\text{Id}$. One has decomposition of $TM\otimes \mathbb C=TM^{1,0}\oplus TM^{0,1}$ with respect to the eigenspaces $\pm 1$ of $J$. Let $v_1,...,v_n$ be a local basis on $T^{0,1}M$ and $v_1^*,...,v_n^*$ the dual sections in $\Omega^{0,1}M$, then the $\bar{\partial}$ operator can be written as $$\bar{\partial}=\sum_iv_i\otimes v_i^*:\Omega^{p,q}\to \Omega^{p,q+1}$$
For example, if $f$ is a smooth function, $\bar{\partial}(f)=\sum_iv_i(f)v_i^*$. Therefore $$\bar{\partial}^2=\bar{\partial}(\sum_iv_i\otimes v_i^*)=\sum_{i<j}[v_j,v_i]v_i^*\wedge v_j^*\tag{1}\label{1}$$
where $[v_j,v_i]=v_j\circ v_i-v_i\circ v_j$ is the Lie bracket of vector fields.
Based on the discussion above, we claim that:
Claim: $J$ is integrable (Newlander-Nirenberg condition holds) if and only if $\bar{\partial}^2=0$.
$\textit{Proof.}$ It follows from $(\ref{1})$ that $\bar{\partial}^2=0$ implies that $v_1,...,v_n$ are $\textit{mutually commutative}$, so any $[\sum_if_iv_i,\sum_jg_jv_j]$ is a linear combination of $v_i$, so $[T^{0,1},T^{0,1}]\subset T^{0,1}$ (It's easy to check this is equivalent to the NN condition on $T^{1,0}$).
Conversely, assuming $[T^{0,1},T^{0,1}]\subset T^{0,1}$, to make sure $\bar{\partial}^2=0$, according to $(\ref{1})$, we need to find a mutually commutative basis $v_1,..,v_n$. This essentially is the Frobenius theorem. One can imitate the proof to give a complex version of that.$\tag*{$\blacksquare$}$
Best Answer
Complex line bundles over $X$ are clssified by $H^2(X,\mathbb{Z})$. Hence choose some cohomology class in $H^2(X,\mathbb{Z})$ but not in $H^{1,1}(X)$ will give you an example.