In essence, you may discuss a project to enhance your understanding of how to perform it or grasp principles. Some situations may not even allow that much contact. If I suspect cheating, or am concerned about who did the work on assignments that are excessively similar, I will call the affected parties in for consultation. If you caught intentionally cheating in any way, and it can be documented, you will be given a failing grade for the course. Further action, such as referral of the case to the Dean of Student's Office, will depend on the facts and severity of an individual case.
Academic dishonesty is a foolish way to take the easy path.
In the long run, you risk being caught and jeopardizing your educational future. If nothing else, even if you are not caught, you hurt yourself by not learning and performing your own work. This usually catches up with you at some later time. Don't think you can fool your instructors all the time. Many forms of cheating are ridiculously easy to detect.