The bearing at the top came apart. The tough part about it will be dependant upon where it came apart. Remove the 3 bolts and the strut. You might have to get a spring compressor the remove and transfer the spring to the new strut.
What probably broke was the bearing at the top.
It should not be too hard as replacing the strut assembly will replace the broken part.
You can either remove the axle nut and the lower control arm or disconnect the lower fork on the strut to remove it. It is really easier to remove the axle nut, you will have to get new ones, and grease bushings while you are at it. Pull the torque rods by un-bolting the front to release the hub, lower control arm must be loose at rear pivot, and then the hub should slide enough out of the way to get the axle past the lower fork of the strut.
The remove and replace spring and re-assemble.