Everything works by gravity here. Small moon rotates over blue planet which rotates over yellow star. And red planet rotates over star too, a bit closer. Planets and moon leave small trace so their movement is easier to see.
Notice that though planets rotate the star, the star also moves a little bit.
I find it fun to throw asteroids in and see what happens.