Gravity

I am new to this. all I want to know is how to make an object attract another object. "developing game based in space". an also make some friends.........
angle = direction(x, y, theotheractor.x, theotheractor.y);
directional_velocity = 3;