Parallax Mouse Sensor Kit

hi. i am not very good at programming. i have one of these modules. i just ran this code and it worked really well. Can you explain how each part works so that i can use it on one of my projects. i want to make an omni wheeled robot that i can move around on the floor then it will return to it's original position.