To gain familiarity you must feed the animal while holding shift; a small burp sound will play when performed successfully. A heart will be visible above the animal when sneaking, and will slowly fill up as the animal becomes more familiarized. Feeding it for 6 consecutive in-game days yields about 30% familiarity; at this point familiarity won't decay for that animal, and a white border will appear around the heart. Without the white border, the animal will slowly forget about you as time passes (although some people report there is a bug where you can lose all familiarity if you miss one day).
Familiarity is passed along to offspring from its mother. If the mother has full or nearly full familiarity, the child will inherit 90% of the mothers familiarity towards the player. Otherwise offspring only inherit 50% familiarity.
Familiarity can be increased by performing a particular action at least once a day:
- Wolves: Feed bones until hearts appear. To further familiarize them; shift-right click to pet them.
- Cows, sheep, chickens, and pigs: Feed them grain.
- Horses: Feed them grain. After a certain point, the horse will no longer become familiar this way. Instead it can be further familiarized by riding it for an average of 30 seconds per day.
- Bears: Feed them fish.
- Deer: Feed them salt.