DNA molecule is the fundamental component of every living organism, since it encodes the hereditary information. Although the genetic code of almost 200 species has been sequenced, the direct connection between gene sequence, DNA structure and biological function remains poorly understood. The aim of this thesis was to investigate the connection between DNA function and structure. Throughout the thesis we will discuss experiments testing the link between different physical properties of DNA with its biological function. For this purpose we used atomic force microscopy (AFM), a high resolution imaging technique. The first chapter is devoted to explain the basic concepts of AFM technique, as well as the composition and structure of DNA molecules. We also describe some of the polymer physics models of DNA, defining basic quantities like the persistence and the critical exponent. In chapter 2 we discuss experiments, in which we studied changes in the physical properties of DNA molecules, when bound to the substrate surface with various methods. We show that, when DNA is strongly bound to the surface, it retains its physiological B-form. On contrary, when weakly bound, a conformational B-to-A-form transition takes place. We also discuss a novel experimental method, combining nanometer sized PDMS slits with AFM, for studying DNA in geometrical confinement. When DNA is weakly confined, DNA persistence length increases, molecules elongate and adopt more anisotropic shapes. Under stronger confinement, DNA hairpins form. In chapter 3 we study binding of staining dyes, proteins and RNA polymerase (RNAP) to DNA molecules. First we show that DNA physical properties are significantly affected when stained with dyes. Depending on the dye binding mode, either the contour length, or the persistence length or both simultaneously change. We move further and investigate the role of protein amino acids and DNA sequence in the formation of nucleoprotein complexes. On the example of EspR protein, a key virulence regulator in Mycobacterium tuberculosis (MTB), we show that single amino acid mutations, lead to lower DNA binding affinity. These mutations also impair the formation of higher order protein-DNA complexes, silencing the MTB virulence. Afterwards, on the examples of RNAP and H-NS protein, we show the importance of DNA sequence for the binding and higher order oligomerization. By introducing DNA mutations disrupting the helical phasing between RNAP binding sites in the fis promoter sequence, we significantly lower the RNAP binding affinity. The helical phasing of the binding sites somehow coordinates the cooperative binding of RNAP to the promoter. Finally on the model of H-NS protein, we show how different spatial arrangements of strong binding sites for an architectural protein in the DNA, determine the final 3D structure of the assembled nucleoprotein complex. The final chapter, is fully devoted to the study of a completely new type of DNA organisation, which we call Hyperplectonemes. Hyperplectonemes are very ordered DNA structures, formed by large supercoiled molecules, in the presence of attractive DNA-DNA potential. First, we describe their structure and its dependence on various environmental factors, than their binding to nucleoid associated proteins. We argue that this emerging DNA organisation is the basic structure of the bacterial chromatin, which is further modulated by numerous DNA binding and condensing proteins in vivo.