Namespace is a way to organize code into logical groups and avoid naming collisions. The System.Console.WriteLine() method writes text to the console window, with System being the namespace that contains the Console class. Namespaces can contain classes and using directives import namespaces to resolve class names without needing the full namespace name.