How to make a mesh programatically.

I want to make a mesh dynamically .Is there any method or code snippet which can help me. I want to make a cube.

The Unity Scripting Reference and Manual is a very handy tool to use: Unity - Scripting API: Mesh