Damage dealt by a source with lifelink also makes its controller gain that much life.
Keyword glossary › Lifelink
Whenever a source with lifelink deals damage, its controller gains that much life. It works on any damage the source deals: combat damage or not, to a creature, a player, a planeswalker or a battle.
Lifelink is not a triggered ability. The life is gained at the same moment the damage is dealt, so there is no window to respond, and it still works if the lifelink creature dies in the same combat.
Because the gain is simultaneous, lifelink can save you from dying. If you are at 2 life and take 3 combat damage while your lifelink creature deals 3 in the same damage step, you lose 3 and gain 3 together and end at 2. The game only checks for 0 life after all of it is done.
Attack with a 2/1 lifelinker, unblocked and then blocked by a 1/1. Step through it, or press Play all.


Before combat
You control Krile Baldesion, a 2/1 with lifelink. Your opponent controls Hecteyes, a 1/1. Both players are at 20 life.
These are real Magic cards. The example only covers the abilities that matter to it.
Real cards with lifelink. Look any of them up in the card search to compare every printing's price.