The energy operator is obtained via the so-called correspondence principle. This means that one considers the classical expression for the total energy
$$\frac{p^2}{2m}+V(x)$$
and replaces the momentum and position variables (numbers in classical mechanics) by the momentum and position operators. $p^2/2m$ is the kinetic energy (it's just another way of writing $\frac{1}{2}mv^2$) and $V(x)$ is the potential energy.
$V$ is first of all just a function of its argument. If you write $V(x)$, you evaluate this function at (the number) $x$. If you write $V(\hat x)$, you replace the position (number) with the position operator, so the whole thing, $V(\hat x)$ is also an operator, specifically the potential energy operator.
This is how you obtain the energy operator $\hat E$ (also called Hamiltonian and thus conventionally written as $\hat H$) from the correspondence principle. This is more of an axiom of quantum mechanics, there is no inherent motivation. The idea is that in the classical limit, the results of classical physics, specifically the classical expression for the energy, should be retrievable.
Now, when you want a specific realization of the position and momentum operators on the Hilbert space the wave functions are going to live in, you replace $\hat x\psi(x)$ by $x\psi(x)$, i.e. the position operator acts on a wave function by multiplying it with $x$, and $\hat p\psi(x)$ with $-i\hbar\partial_x\psi(x)$. By the same token, the energy operator is written as $i\hbar\partial_t$. Note, that the form of the momentum operator and the energy operator are somewhat similar they differ only by $\partial_x$ being replaced with $\partial_t$. If you know Noether's theorem, you will be able to appreciate this fact.
Equating both forms of the energy operator gives the time-dependent Schrödinger equation:
$$i\hbar\partial_t\psi(x)=\hat H\psi(x)$$
where
$$\hat H = \frac{\hat{p}^2}{2m}+V(\hat x)$$