Why is a morphism $\nabla:\Theta_X\to \underline{End}(M)$ a connection (in D-modules)? Let $X$ be a smooth algebraic variety over $\mathbb{C}$ and $\Theta_X$ be its tangent sheaf. Giving an $\mathscr{O}_X$-module $M$ the structure of a left $\mathcal{D}_X$-module is equivalent to the data of a $\mathbb{C}$-linear morphism
$$\nabla:\Theta_X\to \underline{End}(M),$$
which is usually called a connection.
Well... for me, a connection on a locally free sheaf $M$ is a $\mathbb{C}$-linear morphism
$$\nabla':M\to M\otimes_{\mathscr{O}_X}\Omega^1_X.$$
What is the precise relation between those two notions?
 A: If you have a morphism $M\to M\otimes \Omega_X$ and have a section of $\Theta_X=Hom(\Omega_X,O_X)$, you can combine these two to get a map $M\to M\otimes O_X=M$ so you get a connection in the first sense. conversely, if you have an action of the tangent bundle on M, you get an element of  $Hom(\Theta_X,Hom(M,M))$ which by adjunction is equal to $Hom(\Theta_X\otimes M,M)$ which by duality is the same as $Hom(M,M\otimes\Omega_X)$ which is a connection in the second sense
A: Question: "What is the precise relation between those two notions?"
Answer: For simplicity if $X:=Spec(A)$ is a regular finitely generated and commutative $K$-algebra and if $L:=Der_k(A)$ is the module of derivations, it follows $L$ is a finite rank projective $A$-module. There is an "enveloping algebra" $U:=U(A,L)$ and a canonical map
$$\rho: U(A,L) \rightarrow Diff_K(A)$$
where $Diff_K(A) \subseteq End_K(A)$ is the ring of $K$-linear differential operators on $A$. The map $\rho$ is an isomorphism. A left $U$-module structure on $E$ corresponds 1-1 to a flat connection $\nabla$. A flat connection is a map of $K$-Lie algebras and $A$-linear map
$$\nabla: L \rightarrow End_K(E)$$
with
$$\nabla(x)(ae)=a\nabla(x)(e)+x(a)e$$
for all $x\in L, a\in A$ and $e\in E$. There are some things that must be proved: That $\rho$ is an isomorphism, and that there is a 1-1 correspondence between $U$-module structures and flat connections. There are papers on this on the arXiv server. Any "ordinary" connection $D: E \rightarrow \Omega^1_{A/K}\otimes E$ corresponds to a connection $\nabla$ via the property that $Hom_A(\Omega^1_{A/K},A) \cong L$. Given a derivation $\delta \in Der_K(A)$ there is (by the universal property of the module of differentials) a unique $A$-linear map
$$\phi_{\delta}:\Omega^1_{A/k} \rightarrow A$$
and you define
$$\nabla(\delta)(e):= 1\otimes \phi_{\delta}(\nabla(e))\in E.$$
This gives an $A$-linear map $\nabla: L \rightarrow End_K(E)$ satisfying the above criteria. When $Der_K(A)$ is projective as $A$-module this is a 1-1 correspondence.
Question: "Giving an $O_X$-module $M$ the structure of a left $D_X$-module is equivalent to the data of a C-linear morphism
$$∇:Θ_X→End_K(M),$$
which is usually called a connection."
To get a relation with $D_X$-modules you need another result: There is a paper in TAMS by Rinehart on the construction of $U(A,L)$ from 1963 - "Differential forms on general commutative algebras" where Rinehart proves a PBW theorem for $U$.
Note: A $D_X$-module is a module over $Diff_K(A)$ and the correspondence between $D_X$-module structures on $E$ and flat connections on $E$, uses the isomorphism $\rho$. Since $\rho$ is an isomorphism, you get an equivalence of categories
$$Mod(D_X) \cong Mod(U)$$
and if $FConn(L)$ is the category of flat connections on $L$ (and morphisms of connections), you get by the construction of the algebra $U$ an equivalences of categories
$$Mod(D_X) \cong Mod(U) \cong FConn(L).$$
Hence using the PBW theorem you get more than just a 1-1 correspondence - you get an equvialence of categories. The PBW theorem is not a complicated result: As a particular case, it says that for any commutative rings $k \rightarrow A$ with $L:=Der_k(A)$ a projective $A$-module, the canonical map
$$\rho_{PBW}: Sym_A^*(L) \rightarrow Gr(U(A,L))$$
is an isomorphism of graded $A$-algebras.
Example: If $X:=Spec(A), S:=Spec(K)$ and $U_i:=Spec(A_i)$ is an open cover of $X$ where $L_{U_i}$ is a free $A_i$-module on elements $x_1,..,x_n$ it follows you may consider $L_{U_i} \cong Der_K(A_i) \cong A_i\{x_1,..,x_n\}$. The enveloping algebra
$$U(A_i,L_i) \cong A_i\{x_1^{l_1}\cdots x_n^{l_n}: l_i \geq 0\}$$
is a free $A_i$-module on the PBW basis $x_1^{l_1}\cdots x_n^{l_n}$ for $l_i \geq 0$.
The algebra $U(A,L)$ gives rise to a sheaf of associative rings $\mathcal{U}(\theta_X)$ on $X$, which locally has a PBW-basis. When you restrict $\mathcal{U}(\theta_X)_{U_i}$ to the open set $U_i$, you get the sheafification of the algebra $U(A_i,L_i)$.
In the case when $A:=K$ and $L$ is a $K$-Lie algebra, you get the classical PBW theorem valid for Lie algebras.
