Player falls off cubes

I have my player spawn on a cube, but when I move a bit it falls through the cube.

Like I can move and my player goes more and more into the cube and finally falls through.

Why does it do this?

I am new to unity so it is probably a simple thing.

take the rigidbody off your character and add a caracter controller to him instead.
also please show your code so me may have a look to better see the issue.