JTAG is originally an industry standard to make PCB testing easier.
In its initial version it requires 4 or 5 wires (excluding ground), but there is a more recent version that only requires 2 wires (excluding ground).
When JTAG is available, it is generally at least used to test the chip during its production process. The manufacturer will have specific (secret) sequences to enter specific test modes and may disable access to these modes by programming internal EEPROM registers or otherwise.
In case you have a JTAG programmer to program the MCU's memory, then this means that the manufacturer provided a means to use the JTAG interface for programming.
The fact that you can program the MCU using an USB port does not mean that this USB port is using the JTAG interface. There are several Arduino compatible platforms that you can program using the USB because the manufacturer preloads a bootloader in the MCU.
Some MCUs natively propose multiple methods to program them. A low cost STM32 device I recently used has a built-in serial bootloader, but also has a dedicated programming and debug interface. Other STM32 devices may propose a built in USB bootloader compatible with the "USB Device Firmware Upgrade" protocol (techical presentation)
Most devices I have seen though use a serial link over USB using some USB to serial bridge (CH340G, CP2102, PL2103 chips).
Sometimes the USB port is presented as a Mass Storage Device to the PC and you can just drop your microcontroller program on the MCU to program it (this generally requires a pre-loaded "Bootloader").
I am not aware about the current state of the art for FPGA programming, but 20 years ago they already had at least two interfaces for programming them, and they could also read from an external serial EEPROM.
The advantage of JTAG is that JTAG devices can be chained and that the same interface has multiple uses (device programming, device debugging and PCB testing). JTAG standards make automation possible, but making a custom implementation from scratch is not that easy.
Word of conclusion
Most of the time there are alternative methods to the JTAG interface. You can check the datasheet and manuals of the device to find which native protocols are available. You can check with the manufacturer documentation to see if other methods are provided.
Implementing a RS232 like serial protocol will generally be easiest. Using the USB interface often means using "serial-over-USB". If you choose to use the JTAG interface, I recommend that you use the available JTAG tools.