Getting close

How do u make it so that when an object is close to another object it makes the second object go to the first object?