Electrical wiring in ceiling junction box
You don't say otherwise so we assume the light fixture worked, and it was wired correctly. The 3 whites joined together are neutrals and the white neutral lead on the fan is to be connected to them.

Presumably the lone black was connected to the light and must be the switched hot coming from a wall switch. Connect this to the black lead of the fan.

Does the fan have a light kit? If so, and if there is not a separate switch for the light, then connect the (probab) blue light lead to the lone black as well. You would have to control the light with the pull chain.

Connect the ground lead of the fan (which may be green or green w/ yellow stripe) to the set of bare copper wires.

FYI the white wire in the nut with the three blacks is the line hot (always hot) going to the wall switch that will control the fan. The lone black wire will be in the same cable as this white and is the switched hot referred to above. This cable (W, B, gnd) forms what is called a switch loop. The other black wires are taking the line hot to other fixtures on this circuit.