The answer is to ``regularize'' the integrals. Some people do that by setting a finite upper bound on the magnitude of the 4-momentum in Euclidean coordinates (I'll add something about the difference between Euclidean and Minkowskian systems sometime, too) and then taking limits as , but I prefer using something called dimensional regularization (dim reg). In dim reg, you write the integral for n-momentum and solve the integral for the general case of n dimensions. Because we can write in Euclidean space, some integrals that diverge in 4 dimensions will actually converge in a smaller number of dimensions. Anyway, once you have the formula in an arbitrary number of dimensions, you can let n go to 4 (write the integral in a Laurent power series about 4 dimensions). I'll put in a typical integral done in dim reg later.
Generally, there's just a single pole left in the final expression for the integral to represent the whole infinity in the integral, and renormalization lets us get rid of that. Basically, we can say that we forgot some terms in the Lagrangian, and then we can subtract off the infinite part of the integral. In fact, the terms that we ``forgot'' are purely arbitrary, so we can get rid of anything that we want from the formula for the integral, so we have to choose a ``renormalization scheme,'' sort of like choosing a gauge in electrodynamics (but not really; I'll talk about that below). One common way of doing things is saying that the amplitude for a particle to go through a system without interacting is given by the pole on mass-shell (), where p is the 4-momentum in Minkowski space, and m is the mass, and the chance for a certain final product of interactions is just equal to the corresponding coupling constant for certain values of input momenta. Another popular scheme is the method, in which you just get rid of the pole and constant finite parts (except for the omnipresent renormalization parameter). More to follow on this later.
I also studied a bunch of other subjects, and I want to include a bibliography, too, so I'll be sure to add all that in a bit.