Making a collision between 2d objects

Hello,

I would like to know how I can make a collision between two 2d objects.
The objects are simple squares.
One of the squares can move, and I want to make sure it can’t move onto the other square.
What do I need to use to check the collision between them?

I am moving the square using transform.Translate, is there a better way to move it?

Thanks.

As this is very basic functionally I recommend you check out the learn section of the unity site. https://unity3d.com/learn/tutorials/projects/roll-a-ball