Magnetic fields play important roles in black hole accretion disks. The outflows can be driven by the large-scale magnetic field co-rotating with an accretion disk, while the gas in the accretion disk may be arrested by the field if its strength is sufficiently high. In this talk, I will show how the hysteretic state transition in X-ray binaries (XRBs) can be modeled with the disk with magnetically driven outflows. Similar physical processes also take place in the disks of AGNs. We found that some important observational features of CLAGNs can be explained in the frame of the disk with magnetic outflows. We discovered that the radio emission of the XRB MAXI J1820+070 is delayed ~8 days compared with the X-ray flux, which is extremely long for an XRB. We interpreted it as evidence for the formation of a magentic arrested disk (MAD). In this scenario, the magnetic field is amplified by an expanding hot accretion flow in the soft-to-hard state transition, forming a MAD near the black hole around the time of the radio peak.