coan.net: Yes thats exactly how it works. Every player makes best possible 5 card hand out of the 7 cards available to them. It does not matter if the cards are your private hole card or community cards on table.
For example, player A has A2 and player B AJ
Cards on board AK495 -> B wins, Both have pair of aces and King, J decides for B
If board cards are A8992 -> B wins again, both have pairs of aces and nines, and fifth card is J vs. 8. The pair of deuces does not help playerA at all. There's no such thing as three pairs :)
AQ299 -> split pot, both have same best hand, AA99Q. Deuces do not help A this time either.