Well, as to where they come from...how about I give you an explanation of what each means in the context of quantum mechanics/physics?
In 1-D, any analytic function $\psi(x)$ on $(-\infty, +\infty)$ can be written as the infinite sum of sinusoidal functions.
Now suppose our function $\psi(x)$ is a $t=0$ "snapshot" of a time dependent function $\psi(x,t)$.
Using this snapshot, your 2nd integral, known as the Fourier transform of $\psi(x,0)$, gives you the relative strengths $g(k)$ of each wave in the infinite sum making up $\psi$. The actual amplitude of each contributing wave is $g(k)dk$, which means it's an infinitesimal amount, but some waves contribute a "bigger" infinitesimal than others. Here, $k$ is real, but $g(k)$ is complex-valued in general.
Now suppose that all of the sinusoidal functions that sum up to the $t=0$ function are actually $t=0$ snapshots of traveling harmonic waves, where each harmonic wave moves at a phase velocity equal to $\omega/k$ when the clock is running. In much of physics, it is usually the case that $\omega$ is a function of $k$. If $\omega(k)=ck$, where $c$ is a constant, then we can see that the phase velocity of every harmonic wave is the same; it's just $c$. However, if $\omega$ is a more complicated function of $k$, then each wave that contributes to the over all $\psi$ function will travel at a different phase velocity. This is an important concept that explains why wave packets representing particles spread out over time.
So what your first integral says is that the time-dependent complex wave function $\psi(x,t)$ is the infinite sum of traveling harmonic waves, each having a complex relative amplitude of $g(k)$.
If the component waves making up your $t=0$ wave function all travel at the same phase velocity, then you will see your wave function travel at the same velocity without changing its shape. However, if the component waves have a range of differing phase velocities, this means that your wave function will change it's shape over time.
If the g(k) function looks like a "bell curve" centered about some average $k_0$, then the real part of your time-dependent wave function will look like an oscillating wave packet that widens and decreases in amplitude over time as it travels.