Flow of electric charge, carried by electrons or ions in a medium such as an electrolyte or a plasma.