Stochastic thermodynamics has become one of the main cornerstones of modern statistical mechanics and special attention has been given to systems presenting collective behavior. In this master project, we have investigated distinct aspects in two classes of systems exhibiting collective behavior. The former is an opinion system displaying a variety of phase transitions depending on the model details (topology, inertia, and neighborhood). We have investigated in detail its properties by formulating a consistent thermodynamics approach by relating heat with dissipation. The latter system studied here is a minimal prototype of a nonequilibrium engine model displaying collective behavior, composed of two interacting nanomachines. We investigated its thermodynamic properties, such as efficiency, power, engine design, and distinct routes for improving its performance. Results show that a suitable choice of parameters and design can result in a remarkable improvement, including maximum efficiencies approaching ideal values and efficiencies at maximum power greater than known bounds in the literature.