Similar to Dragon Age: Origins, the Friend/Rivalry scale is a 200 point scale that determines your relationship with your companions: you start out at zero, and can go 100 points in either direction. It affects the dialogue you get with companions, your ability to romance them, as well as special abilities.
However, there are some important differences from Dragon Age: Origins. Overall, the approval system is greatly simplified and it's easier to achieve your end game goals.
Friendship vs. Rivalry
Like Dragon Age: Origins, you can do things that pleases your companions and you can do things that annoy them. However, in Dragon Age II, the assumption is made that you can't do anything that'll cause your companions to hate you (otherwise, why would they help you?). Instead, annoying your companions leads them to be your rival: they still support you, but there's some tension.
Because of this, rivalry isn't a bad condition to be in, per se, unlike Dragon Age: Origins. You can still romance characters, complete their personal quests, and unlock their approval-specific abilities.
Instead, apathy is the new bad condition. If you don't move your approval bar far enough one way or the other, you'll trigger a crisis point similar to the ones you could trigger if you sufficiently pissed off a companion in Dragon Age: Origins.
Getting a character to 50%-100% rival/friend and completing their personal quest unlocks a special conversation towards the end of the game that's determined based on if they're your friend or rival at the time: it serves to cement the relationship you have with the companion.
Additionally, at 100% friendship/rival, your relationship will be locked for the rest of the game: nothing you do or say will make the approval rating change. You'll also unlock the companion's approval-based ability. Compare to Dragon Age: Origins, where you got a new ability at 25%, 50%, 75%, and 100% approval, and could piss off everyone who loved you except Dog.
There are a couple of exceptions to the above paragraph depending on the companion, but I won't spoil it.
Unlike Dragon Age: Origins, all except one of the romance-able companions are bi-sexual: the only thing that matters is your approval rating.
In Dragon Age: Origins, you could only romance a character only if your approval was relatively high. In Dragon Age II, because rivalry replaces hatred, pissing a companion off doesn't preclude their desire to start a romance with you. You can set up the conditions for a romance for most companions as long as you're >50% towards friend or rival.
In Dragon Age: Origins, romance was a "flag" that changed what the numbers on your approval bar meant: so you'd have two parallels approval ratings for each companion that you romanced. This has been simplified in Dragon Age II: you can enter into a romance with a companion at 100% friend or 100% rival, and if you take into account the approval lock above, you specifically have to explicitly end a relationship for it to fall apart.
Like Dragon Age: Origins, specifically the Feast Day DLC, gifts refer to a class of items that affect approval, one way or the other. If you give a gift that the companion likes, it pushes their approval to friend. If you give a gift the companion hates, it pushes their approval to rival. You can use gifts as a supplement to dialogue to fine-tune or speed up the approval process.