A critical infrastructure consists of basic assets and facilities whose functioning has a significant impact on the society and economy of a country, as well as on its security. The life and work of the citizens of a country are largely dependent on a smooth operation of various energy, telecommunication, water and sewage facilities, as well as the network of hospitals and health institutions, transportation, etc. The safe functioning of these systems is a prerequisite for the existence and development of a social community in an area. Therefore, it is necessary to undertake all necessary activities to preserve a critical infrastructure both in reality and cyberspace. With the development of the Internet, there has been a transformation of people's work and life in the broadest sense, in such a way that it has become an indispensable part of everyday life of each of us. Together with the largest global network increasingly used as well as the various services people necessarily being relied on in the new reality the world encountered during the COVID-10 pandemic, there has been created a vast space attracting the malicious users. They act by using the known mechanisms of functioning communication networks and other information technologies, finding the system vulnerabilities and exploit them. In this paper, we will analyze the cyber security of a critical infrastructure, cyber attacks on a critical infrastructure and the measures needed to be taken to mitigate the consequences of cyber attacks.