There’s many different ways of measuring current. If it’s DC, the easiest way is to use a shunt resistor and measure the voltage across it, and for AC you could use a current transformer.