In the .hack games, affection is how well a character likes Kite. Affection for each character can be looked up in Ryu Book V. The affection a character can have towards Kite caps at 250 in INFECTION, and this cap increases by 250 for each subsequent game, reaching a maximum of 1000 in QUARANTINE.
Affection is increased by giving gifts to the character, spending time with the character in a party, and giving the correct answers in e-mail chains.
Higher affection unlocks new e-mail chains, and maximum affection triggers a "max affection" e-mail after beating QUARANTINE. Higher affection also affects how much you need to offer for trades with that character, and it allegedly affects their actions in battle. Affection does not affect any Ryu Book rewards.
In the G.U. games, affection is how well a character likes Haseo. Unlike the original games, affection isn't represented by a number, but a color-coded icon on a party member's status screen. The affection icon is a large colored circle with 0 to 5 smaller dots orbiting around it. From lowest to highest, affection is represented:
Red: 0-5 levels
Blue: 0-5 levels (Blue level 3 is the maximum for Rebirth)
Yellow: 0-5 levels
Pink: 0-5 levels (Pink level 0 is the maximum for Reminisce)
Pink level 5 is the highest affection possible.
Affection is slowly increased by giving characters gifts, giving them good trades, answering correctly in e-mail chains, and performing favorite actions during battle. Unlike the original games, there are very few automatic e-mail chains in .hack//G.U. The only way to start e-mail chains is to send Greeting Cards. Also unlike the original games, it is possible to lose affection with a character by giving them gifts they don't like, trading back for an item that was given to that character, and allowing them to die in battle.
A character's Favorite Action is an action performed in battle that results in the character saying a golden-text message labeled "Favorite" next to their battle portrait. A successful Rengeki results in a Favorite Action for every character. Additional favorite actions depend on the character. Some favorite actions include healing the character while they are in critical status and performing a full combo with your weapon.
Kicking the God Chim Chim is the fastest method of increasing affection, increasing the affection of every party member by several levels in one trip.
Higher affection results in better deals on trades with that character, higher damage for the Divine Awakening skill, and, at maximum affection, eligibility to get married.
In .hack//Link, instead of Affection, recruitable characters have a Confidence gauge. This is represented by 5 hearts on the character status screen.
Confidence is slowly increased by answering correctly on Link Judgment questions and challenges and by pressing the correct button on the heart icons that appear during X Rengeki.
Higher confidence ratings unlock X Rengeki bonuses, and broaden the size of the target zone on the unison combo gauge.