Spintronic terahertz emission: insights and applications