It's pretty simple. If you set the velocity to a positive number it moves right (x) or down (y), and if it's negative, it moves left (x) and up (y).
With a combination of both you move diagonally.
Density, friction (of this and the object it is moving against) and linear dumping will slow the object down over time.