Active phenomena in astrophysics such as X-ray and Gamma-ray emissions and jet formation are studied both by theoretical methods and by numerical simulations. We focus on the role of magnetic fields in such activities. The left panel shows a result of simulation of jets ejected from an accretion disk rotating around a central object. As the magnetic field lines are twisted by the rotation of the disk, bipolar jet is ejected. The jet is collimated toward the rotation axis due to the pinch force of twisted magnetic fields.