Check the video bellow..And please learn the ways to disarm an armed person :
1.Be aware that your goal in a situation like this is to save your life. Fighting back greatly increases your odds of losing your life.
If you have not been trained by the military, the police or endured extensive martial arts training specifically in the area of disarming an opponent, the safest option when faced with a handgun is to do whatever the person says, with the exception of entering a vehicle with the attacker. You are gambling with your life in this situation, it is not the movies, and in almost all cases, your attacker will have more experience in this kind of situation than you do.
Be aware that the most common mistake made by potential victims in cases like these is over confidence. Over confidence leads to the vast majority of deaths. The second most common mistake is fighting back. However, there are times when you may calculate that you need to do so. For example, let’s say you’re caught up in a school shooting where it’s obvious the attacker’s goal is simply to kill as many people as possible.
2.Grab their arm at the wrist. If you’ve decided that you need to disarm the criminal because it’s likely you will be shot otherwise, spin the gun away from you. This technique is very dangerous. Do not attempt it if you are not properly trained, unless absolutely necessary.
The goal is to make sure the gun is pointed away from your body as you grab it, and spin it away.
Continue the energy you’ve created by twisting the arm with the gun around you to the right as you face away from where the criminal was originally positioned. Now, flip the gunman on the ground as you spin to the right while holding the gunman’s arm.
Keep your hand on the attacking arm, and take the gun. You can also step over the gunman and hold his arm with your leg.
3.Grab the gun directly from the hand. Twist the gun down, breaking the criminal’s finger as you do it. Remember, the criminal’s finger will be in the trigger.
Twist the gun to the right. All of these maneuvers are dangerous if the criminal is stronger than you and also risk the gun firing and striking other people in the area.
Take the gun from the criminal’s wounded hand. Use the right hand to stop the wrist as you use the left hand to bend their wrist, grab the gun, and push the gun down. This is very important. If you don’t grab their wrist before twisting the gun down, you will risk them maintaining control of the gun.
4.Disarm a gun pointed at your back. Turn around, and step in and under their arm, and rip the gun out of the criminal’s hand.
You could do either of the first two steps next; either, you will want to twist the gun in the criminal’s hand, breaking his finger. Or just rip the gun out of their hand. Move the left hand on the side of the attacker’s gun and at the same time move your body to the attacker’s right side.
Before you do this, wave your hands as if surrendering and saying don’t shoot. After moving your left hand to the side of the attacker’s gun, take a right counter-clockwise circular step in between the attacker’s feet while turning the gun toward the attacker.
Your wrist should lock the attacker’s right hand, and turn the gun at the attacker’s throat, bringing the attacker to the ground. In each of these moves, the goal is to reposition the gun before twisting it from the gunman’s hand.
5.Control the weapon. You must take control of the weapon so the gunman cannot redirect it at you. This will unfold fast, and the gunman will try to regain control. 
Burst in forward. Put your weight inward and downward on the gun. You are trying to get the weapon down and inward to limit the ability of the attacker to move it. Move your feet to keep putting weight on the weapon no matter how the criminal reacts. 
You will want to use your hip muscles and body weight to torque an opponent’s wrist to take them down. In one move, put enormous pressure on the attacker’s wrist, forcing them down to the ground while placing strong control of the weapon. You can kick the criminal to the head, midsection or groin to remove the weapon.
Or reach over the attacker’s shoulder and clench the rifle’s butt stock. Insert your right hand with the thumb pointed toward the ground to grasp the weapon’s stock. Yank the weapon toward you to weaken the attacker’s leverage and yank it shortly up. Wrench the weapon away.
Credits: Active Self Protection