I am making a project with unity and leap motion, but I'm new with leap. I'm trying to move gameObjects but when I add the property of rigidBody to it and touch it with the handmodels it flies away, how do I avoid this?
Because the default physics hands Leap provides in its core assets are interpreted as "kinematic," they basically have infinite mass. Objects are flying away when you try to grab or touch them because the underlying physics solver is trying to figure out what happens when you crush a perfectly rigid body (hence "Rigidbody") between two other rigidbodies of infinite mass... The solver winds up with huge velocities and as a result you get behavior that looks weird and feels bad.
There's some fancy math (Kabsch solving) and real-time physics (soft, non-rigid contact behavior) involved in make touching and grasping objects feel good, so you're probably just going to want to download Leap's Interaction Engine, which does all of that for you!
Make sure you have the latest "Core Assets" from the main developer resource page, and you can find the "Interaction Engine" on that same page.
Download those packages and import them into Unity, then your workflow will basically work thusly:
From there, you should be good to go. If something stops working at any step, you can check out the Interaction Engine 101 example on the developer page; it's an open-source Unity project with a working implementation of the latest Interaction Engine.