In my university experience, the first day of every class starts with administrivia, which includes the grading policy, homework policy, and what degree of cooperation actually constitutes cheating. In CS, the usual threshold for cheating is whether or not you actually wrote the code yourself--you can (and are encouraged to!) work with other people to discuss how to solve the problem, but you have to sit down and actually write the code up yourself.
That said, as a TA, I found that I really didn't want to put any effort to identify if students were cheating. I did catch a few cheaters, but largely because they inadvertently broke my grading setup in ways that made me suspicious that they were getting their code from something other than the homework assignment.