Rapid developments in digital system and networking technologies have led to the emergence of complex systems that are de facto managed and controlled over cyber infrastructures, such as wireless and wired broadband networks. The emergence of this type of network systems, which range from smart grids and traffic networks of various sorts, to embedded electronic devices and robotic networks, has sparked huge interest in distributed control problems. This is due to the need to properly coordinate the information exchange between sensors, actuators, and controllers in order to enforce a desirable behavior, without relying on a centralized decision maker. In this monograph, we present some recent progress in this area by focusing on the key operations of distributed average consensus and weight/flow balancing under a variety of communication topologies and adversarial network conditions, e.g., delays, and packet drops. These operations are key in control, coordination, and optimization tasks in many emerging applications; two of these, which we discuss in detail, are the coordination of distributed energy resources, and the computation of PageRank values.