In GTA V, there are three types of hits you can perform on other players: a standard hit, a power hit and a vehicle hit. To successfully defend against any of these hits, you must first understand the type of hit being performed and then follow the appropriate countermeasures.
A standard hit is the most common type of attack in GTA V and can be easily defended against by simply blocking with your left bumper (LT on Xbox One). If timed correctly, your block will completely negate the damage from the incoming attack. However, if you're too late or early with your block, you'll still take some damage.
A power hit is a more powerful version of a standard hit and can only be defended against by parrying with your right bumper (RT on Xbox One). Parrying an attack will not only negate all damage from the incoming attack but will also briefly stun your attacker, leaving them open to counterattack.
Lastly, vehicle hits are performed by driving into another player with your car. These are difficult to defend against since cars are much faster than players on foot. The best way to avoid taking damage from a vehicle hit is to use cover or get out of the way as quickly as possible. If you're caught in the open when someone tries to ram you with their car, there's not much you can do except try to jump out of the way at the last second.