Step 1: Compare the two conjugate bases. Acid strength is judged by how comfortable the anion is after the proton leaves; a well-stabilised anion means a stronger acid.
Step 2: The bare phenoxide ion parks its negative charge on oxygen and shuffles it around the ring to the two ortho and the para carbons through resonance. That delocalisation is what already makes phenol acidic.
Step 3: Now bolt an electron-hungry nitro group onto the ortho position. Being strongly electron withdrawing by both induction and resonance, it opens new resonance forms in which the ring's negative charge slides right onto the nitro group's oxygen atoms. The charge is now spread over more, and more electronegative, atoms.
Step 4: Greater spreading means a lower-energy, more stable ortho-nitrophenoxide ion, so ortho-nitrophenol gives up its proton more easily than phenol and is the stronger acid. When drawing the phenoxide resonance set, show the lone-pair on oxygen pushing into the ring to place the minus charge successively at oxygen, ortho, para and the second ortho position; for the nitro compound add the two structures that carry the charge onto the \( NO_2 \) oxygens.