Cartridge BBs (square taper). There are also similar cartridge BBs with fatter axles, splined at the ends.
Sideways play in cartridge BBs can only be adjusted out if it's due to a loose lockring (top left).
More usually, it's because the bearings are worn, as was the case with the bottom unit, in which case replacement is all you can do. Usually, you can carry on riding, just putting up with the play, for quite a long time, but occasionally a bit of broken ball, or the ball clip, can jam up the bearing.
Quiz:
Can anyone spot why I thought it worth taking a photo of the old BB after I'd unscrewed it from the frame?