I have a very simple criterion for plagiarism: submitting the work of another person, whether that be another student, something from a book, or something off the web and representing it as your own is plagiarism and constitutes academic misconduct. If the source is clearly cited, then it is not academic misconduct.
If you tell me ``This is copied word for word from Jane Foo's solution'' that is not academic misconduct. It will be graded as one solution for two people and each will get half credit. I guess that you could try telling me how much credit each of you should get, but I've never had anyone try this before.
I encourage you to discuss the homework problems with each other outside of class. You can help each other understand the concepts and techniques needed to solve the problems, and you can brainstorm together to figure out ideas for solving the problem. If you come up with the actual solution yourself, that's fine. If you're brainstorming with some friends and the key idea comes up, that's OK too - in this case, just add a note to your solution that says something along the lines of "{Names of people in brainstorm session} and I were discussing this problem together and came up with the idea of {state the key idea from the brainstorm here}''.
If you say that you got it off of the web or from another text, you'll be graded by the extent to which your solution shows that you actually understood the solution that you found and were able to reformulate it using your own reasoning.
If you get a solution by any means other than working it out yourself and don't disclose it, then I will follow the university procedures for academic misconduct.
See also: http://members.aol.com/quentncree/lehrer/lobachev.htm