How does rycast work?

Hi, I have been making something like minecraft clone. Not to play or anything, just a challenge to myself. I wont even release it. Purly for education pruposses. I have some things set up but how do I break / place blocks? I did some research on dynamic creating of gameobjct and found Raycast. The docummentation is poor thought and I didnt find any suiting tutorials. Can anyone explain or point me to explenation (not just the methods that are to it but what it does, I dont think I understand it propereally) (I want to know as much as I can, so I guess simple answer wont be enaught :D).

Raycast has nothing to do with creating dynamic objects. Ray cast is a collision function used for pick rays and such.

TO dynamically create an object in Unity you need to

  1. Create a mesh
  2. Create a game object
  3. Assign the mesh to the game object
  4. Assign a renderer to the game object

If you want it to react to physics you also need to assign a rigidbody and a collider to the game object

http://unity3d.com/learn/tutorials/modules/beginner/physics/raycasting

I cant beleive that anyone can make better description than this