A current produces a magnetic field. For a small current element, the field contribution is described by the Biot-Savart Law:
This means the magnetic field depends on the current, the geometry of the wire, the location of the observation point, and the inverse square of the distance from the current element. The direction is determined by the cross product, which is why the magnetic field wraps around a straight wire in circular loops.
For highly symmetric cases, the Biot-Savart integral leads to standard results. For a long straight wire,
and for the center of a circular loop of radius R,
for one loop. The Biot-Savart law is powerful because it builds magnetic fields from source currents directly, but it is most practical when the geometry is simple or highly symmetric.