DNA ligase works by catalyzing the formation of a bond between the 3'-hydroxyl end of one nucleotide and the 5'-phosphate end of another. This process is essential for DNA replication and repair. The enzyme recognizes and binds to the nick in the DNA strand, facilitating the chemical reaction that results in a continuous DNA molecule.