In this paper, we investigate the notions of $\mathcal{X}^\bot$-projective, $\mathcal{X}$-injective and $\mathcal{X}$-flat modules and give some characterizations of these modules, where $\mathcal{X}$ is a class of left $R$-modules. We prove that the class of all $\mathcal{X}^\bot$-projective modules is Kaplansky. Further, if the class of all $\mathcal{X}$-projective $R$-modules is closed under direct limits, we show the existence of $\mathcal{X}^\bot$-projective covers and $\mathcal{X}$-injective envelopes over a $\mathcal{X}^\bot$-hereditary ring $R.$ Moreover, we decompose a $\mathcal{X}^\bot$-projective module into a projective and a coreduced $\mathcal{X}^\bot$-projective module over a self $\mathcal{X}$-injective and $\mathcal{X}^\bot$-hereditary ring. Finally, we prove that every module has a $\mathcal{W}$-injective precover over a coherent ring $R,$ where $\mathcal{W}$ is the class of all pure projective modules.