Building a cube by a script

I know how to build a plane. Modify it.

But how to build a CUBE or sth using coordinates?
How to build collider on it?
How to make it empty inside (like in a box - you can see it from outside and inside(have walls))?

See: Unity - Scripting API: Mesh