Formation of black holes If stars start with a finite density and light can escape from them, how can they be compacted to form a mass with infinite density which light cannot escape? The black hole will have the same mass as the original star (correct?) and therefore will act on the photons with the same force of gravity, right?
 A: Gravity is not merely a function of mass, it also depends on how compact the matter is; you can deduce this from Newton's law of universal gravitation:
$$F = G\frac{m_1m_2}{r^2}$$
In layman terms, the more compact the body, the closer you can get to it without entering it, the smaller $r$ becomes, which makes the gravitational pull stronger.
I do not know enough to tell you about why a black hole has (or, is considered to have) infinite density, but since its mass is finite, its volume must tend towards zero for that to be true.
A: @Paul is correct, the gravitational pull depends on the masses and the distance between the masses in Newtonian Gravity.  To understand black holes, Einstein's General Theory of relativity needs to be used, but qualitatively you get the same result.
To get a stellar black hole, the star, or part of the star, must be compressed to a small enough radius such that the escape velocity at that surface exceeds the speed of light (this is a qualitative way of stating it, in reality the time-like future light cone becomes "rotated" into a spatial direction towards the interior of the star.  The radius where this occurs is the Schwarzchild radius.  
Once the surface of the star has contracted to inside the Schwarzchild radius it is inevitable that the star will continue to collapse to the center. Theoretically, at that point, all the mass would be concentrated to a point at the center of the black hole which would become a singularity. Physicists don't actually believe that infinite density will occur - the belief is that General Relativity will break down near the Planck radius and a different theory will be required.
What is required to have a black hole is not the "infinite" density, just that the stars mass be inside the Schwarzchild radius.
A: 
The black hole will have the same mass as the original star (correct?) and therefore will act on the photons with the same force of gravity, right?

Wrong but I know where the misconception is coming from. If you were at the Earth's orbit, the gravitational pull wouldn't change if the Sun were ten times bigger or smaller in radius. But if you were somewhere inside the Sun, it would. 
Maybe think of it like this. Suppose you go to the radius of the Sun at which half the mass is inside. That would give some gravitational force. Now, imagine all of the Sun's mass were inside that radius. Then the gravitational pull would be stronger because you have more mass pulling at the same radius. In this sense, a more compact object has a stronger gravitational field, you just have to be close to the object to feel the difference.
You could go to much smaller radii. If you were just over 3km from the centre of the Sun, you wouldn't feel much gravity, because there would be very little mass inside. But if all the Sun's mass were confined to less than 3km, you'd be just above the event horizon of a black hole of one solar mass.
Black holes form basically by massive stars becoming incredibly compact, until their mass is confined inside their Schwarzschild radii. Light can still escape from where the surface used to be, but very close in, it can't.
Also, the infinite density point isn't important. This all happens as long as the mass is confined to less than its Schwarzschild radius. We can't see "inside" the black hole, so we don't know what happens to the matter inside. Fortunately, it also doesn't matter for the exterior gravitational field.
