Let $X$ be a CohenMacaulay variety. $\omega$ denotes the dualizing sheaf of $X$. Can we get $\mathcal{Hom}(O_X,\omega)\otimes \mathcal{Hom}(\omega, O_X)=O_X$?

The answer is no. $\mathcal Hom (\mathcal O_X,\omega)\simeq \omega$, but $\omega\otimes \mathcal Hom (\omega, \mathcal O_X)$ is not necessarily reflexive, let alone locally free. However, it is true that if $X$ is $G_1$, that is, Gorenstein in codimension $1$, then $$ (\omega\otimes \mathcal Hom (\omega, \mathcal O_X))^{**}\simeq \mathcal O_X. $$ EDIT: (due to popular demand, here is a better formed statement for the CM is not even needed part of the original) This is actually true in a little more general setting: For simplicity assume that $X$ is $G_1$, $S_2$, equidimensional of dimension $d$ and admits a dualizing complex denoted by $\omega_X^\cdot$. (If, say, by variety you mean a quasiprojective (reduced) scheme of finite type over a field, then the last assumption is automatic. If in addition you also mean irreducible, then so is the equidimensionality. CM obviously implies $S_2$.) Let $$\omega_X := h^{d}(\omega_X^\cdot)$$ and $$\omega_X^*:=\mathcal Hom_X (\omega_X, \mathcal O_X).$$ Then $${(\omega_X\otimes \omega_X^*)}^{**}\simeq \mathcal O_X.$$ This follows by the fact that $X$ is $S_2$, both sides are reflexive and they agree in codimension $1$ due to the $G_1$ assumption. EDIT2: (inspired by Karl's answer): This actually also implies that $$\mathcal Hom_X(\omega_X,\omega_X)\simeq \mathcal O_X$$ (under the same conditions) since on the open set where $\omega_X$ is a line bundle, $$\mathcal Hom_X(\omega_X,\omega_X)\simeq {\omega_X\otimes \omega_X^*}$$ and then since they are both reflexive and $X$ is $S_2$, $$\mathcal Hom_X(\omega_X,\omega_X)\simeq ({\omega_X\otimes \omega_X^*})^{**}\simeq \mathcal O_X.$$ 


Above, in a comment, Hao Sun asked if it was true that $\mathcal{H}om_X(\omega, \omega) = \mathcal{O}_X$. Here I will assume that $X$ is reduced and irreducible and $\omega$ is the canonical sheaf as discussed in S\'andor's answer. This second question is true if and only if the variety in question is S2 (so in particular, it holds in the CohenMacaulay case). In fact, $\mathcal{H}om_X(\omega, \omega)$ is the S2ification of $\mathcal{O}_X$ (and thus, Spec of it is the S2ification of $X$). EDIT: A reference for this last fact is Aoyama, "Some basic results on canonical modules", also see Aoyama, "On the depth and projective dimension of the canonical module". EDIT2: Let me also sketch an idea for why this last statement is true. On a nonS2 variety $X$, the canonical sheaf of $X$ is the same as the canonical sheaf of the S2ification of $X$ (up to pushdown). To see this, observe that S2ification is an operation outside a set of codimension 2, and also observe that $\omega$ itself is always an S2sheaf for a variety (see for example, a paper of Hartshorne, "Generalized divisors and biliaison"). It then quickly follows that $$ \mathcal{H}om_{O_X}(\omega,\omega) = \mathcal{H}om_{O_{X^{S2}} }(\omega, \omega).$$ This sheaf is clearly S2 (since $\omega$ is), furthermore, $$R\mathcal{H}om_{O_{X^{S2}} }^{.}(\omega^{.}, \omega^{.}) \cong {\mathcal O_{X^{S2}}}.$$ All the other terms appearing in that spectral sequences used to compute that have support at a codimension2 subset, and it follows that ${\mathcal O_{X^{S2}}}$ and $\mathcal{H}om_{O_{X^{S2}} }(\omega, \omega)$ are isomorphic outside a set of codimension 2, and the result follows. 


However if X is proper and finite type over any field there does exist a dualizing sheaf, and it agrees with the top nonzero homology sheaf of the dualizing complex. Addendum I mean by dualizing sheaf, a sheaf that represents the functor $\mathcal{F} \mapsto H^n(X,\mathcal{F})^{\vee}$, i.e. such that there is an ismorphism $$ \mathrm{Hom}_X(\mathcal{F},\omega_X) \cong H^n(X,\mathcal{F})^{\vee}. $$ For me, canonical is related to local duality, in this sense $\omega_{X,x}$ is a canonical module for the ring $\mathcal{O}_{X,x}$. Of course you need Cohen Macaulay to have $$ \mathrm{Ext}^i_X(\mathcal{F},\omega_X) \cong H^{ni}(X,\mathcal{F})^{\vee}. $$ for every $i$; this would make $\omega_X$ a dualizing complex. This story is explained in a somewhat elementary way (without derived categories) in Kleiman's "Relative duality for quasicoherent sheaves" in Compositio Mathematica. In the case that $k$ is a perfect field there is characterization of $\omega_X$ in terms of differentials and traces, see Lipman's Asterisque 117, aka "Lipman's blue book". In this book a nice treatment of residues is given in this setting. 

