How are hard and soft shadows cast? I have been studying computer graphics, from the book Fundamentals of Computer Graphic (but the third edition), and I lastly read about texture mapping and shadow maps. Though, I didn't exactly understand how they function. I know there is also another type of texture map called projective texture map which allows to cast hard shadows, but how they function? On the other hand, how are soft shadows cast? And what's exactly the difference between hard and soft shadows?
Hard shadows are simple that only needs a point light. 

How it's done is by rendering the scene from the point of view of the light and only keep only the depth information. This is the shadow map.

Then when doing the actual rendering you calculate the point on the triangle in world space and find where it would be on the shadow map. Then you sample the depth from the shadowmap at that point and compare it to the distance to the light.

Soft shadows are harder. They require figuring out how close you are to the edge of what would be a hard shadow and adjusting the light value based on that. There are several techniques for that. One of which is simply sampling multiple times.