Ns-2 is a discrete event network simulator used for modeling wired and wireless network protocols. It has two main components - the C++ simulator engine for fast packet-level processing, and the OTcl scripting language for configuration and control. Simulation involves setting up nodes, links, agents, applications and traffic before scheduling events and running the simulation. Traces can then be analyzed to evaluate network performance.