This paper presents the results of MHD simulations of astrophysical and laboratory supersonic jets under a superposition of poloidal (Br, Bz) and toroidal (Bϕ) magnetic fields. It is shown that the escaping matter is quickly collimated by the magnetic field. A shock wave of an elongated shape is formed, which moves from the target to the boundary of the chamber, leaving behind a stable flow. A periodic shock wave structure is observed inside the main conical expanding shock wave. It is shown that the toroidal component of the magnetic field remains in the region throughout the entire calculation and plays a role in the collimation of the flow. The poloidal magnetic field decreases in the region of the jet cone, but remains in the simulation region throughout the calculation and also participates in flow collimation. Thus, both components Bz and Bϕ take part in the collimation of the flow by the magnetic field. The width of the jet and the opening angle of the cone Ɵ depend on the magnitude of the magnetic field induction. As the field increases, the jet becomes narrower and the cone angle decreases. Initially, we do not specify the rotation of the jet Ω. However, due to the presence of the Bϕ field, the substance acquires angular velocity and twists along the z axis. The simulation results are in agreement with laboratory jets arising in the experiment at the Neodymium laser installation, and with the previously obtained results of MHD modeling of jet formation separately, in poloidal or toroidal magnetic field.