Paramagnetic molecules get attracted towards external magnetic field and diamagnetic repel the external magnetic field. You can easily predict the magnetic nature of any molecule/atom by its electronic configuration. If it has any unpaired electrons it will be paramagnetic and otherwise it will be diamagnetic.
o2- is paramagnetic