InAdding a few more words to Pete's answer...In the Galois case, at least, the inertia degrees $f$ and ramifications indices $e$ of each prime $P_i$ lying over $p$ are the same. If $p$ is unramified then $e = 1$ and so the only question is what is $f$ and what is $g$? The common degree $f$ is the order of any (and each) of the Frobenius elements $(P_i | K/\mathbb Q)$ which map to the generator of the local Galois group $G(k(P_i)/\mathbb F_p)$. I always recommend Milne's online notes http://www.jmilne.org/math/CourseNotes, both the algebraic number theory and class field theory, for this kind of question. I also remember well reading this material in the Janusz book "Algebraic Number Fields". In the latter, I believe Chapter 1 and Chapter 3 are most relevant, but I do not have a copy with me.