Two atoms far apart being brought closer to each other, their potential energy decreases until the nuclei repel each other (the repulsion). The nucleus of one atom is attracted to the electrons of the other atom. As the distance gets less, the potential energy gets less.