Some say UART is hardware, some say UART is one of the serial communication protocol.
Both of your first two links are, simply, wrong. A UART is a piece of hardware which can implement a number of different protocols which are used to frame asynchronous data streams. The U is an acronym for "Universal", and while it is effectively correct there is no reason a protocol could not be used which confounds the present population of UARTs - other than the fact that it's not worth the effort.
The different protocols handled use different numbers of bits for detecting start and stop conditions, presence or absence of a parity bit (and its polarity), and frame data lengths. Typically you can specify 5,6,7 or 8 data bits per frame. If someone were to insist that his/her data must be formatted into 4-bit frames, no existing UART chip would be able to handle it.
In part, this is a matter of definition. Merriam-Webster, for instance defines protocol (for this context) as
a set of conventions governing the treatment and especially the formatting of data in an electronic communications system
Note that the hardware implementation is not part of the definition.
It is a both actually. UA stands for Universal Asynchronous which handles asynchronous serial transmission. RT stands for Receiver/Transmitter which are clearly hardware terms.
The UART is both the hardware which implements the (UART) protocol. The hardware part is mostly called the UART 'peripheral' or device.
However, the UART protocol can also implemented by software only (by using 2 GPIO pins for receiving and transmitting). Mostly this severely uses up the CPU power (depending on the communication speed).
Because serial communication is so widely used, most microncontrollers have at least one hardware UART peripheral to let most of the handling done by hardware (like buffering, splitting bytes into bits and sending/receiving, adding start/stop bits, handling the parity bit etc.).
UART (Universal Asynchronous Reciever/Transmitter) most properly refers to a funcional block (normally hardware but occasionally software) for transmitting and receiving asynchronous serial data that can be configured for a selection of different baud rates, bit counts, parity etc.
But despite the "universal" in the name the flexibility is still quite limited and the basic format largely fixed. There is a "start bit" when the line moves away from idle state to indicate the start of a "byte", a number (usually 7 or 8) of data bits, optionally a parity bit and then one or two "stop bits" with the line back in idle state to ensure that each byte starts with a transition out of idle state.
People need a name for this family of encodings, they could just use the term "asynchronous serial", but that is rather too vauge. There are plenty of asynchronous serial encodings that are very different from those that can be handled by a UART. So for better or worse this method of encoding gets refered to as "UART serial" or just "UART". Essentially the encoding gets named after the hardware used to implement it.
UART/USART is indeed hardware. In fact, before we even begin discussion of terminology here's a popular example from 80s: UART 8250, which is
"...an integrated circuit designed for implementing the interface for serial communications".
If you look through terminology, you'll see hardware elements being referenced. For instance in Microchip presentation 'Using the USART in Asynchronous Mode', you'll notice thing like clock, pins, duplex, and interface mentioned:
USART stands for Universal Synchronous Asynchronous Receiver Transmitter. It is sometimes called the Serial Communications Interface or SCI. Synchronous operation uses a clock and data line while there is no separate clock accompanying the data for Asynchronous transmission. Since there is no clock signal in asynchronous operation, one pin can be used for transmission and another pin can be used for reception. Both transmission and reception can occur at the same time — this is known as full duplex operation. Transmission and reception can be independently enabled. However, when the serial port is enabled, the USART will control both pins and one cannot be used for general purpose I/O when the other is being used for transmission or reception.
Let's now look at TI document 'Interface Circuits for TIA/EIA-232-F':
Looking at the DB9 interface one step back into the digital system, there is, in most cases, a universal asynchronous receiver/transmitter (UART) or asynchronous communication element (ACE). The ACE provides the parallel-to-serial conversion and the necessary start/stop bits, parity-bit generation, and checking for error-free data transmission.
A universal asynchronous receiver and transmitter(UART) is a circuit that sends parallel data through serial line. UARTs are frequently used in conjunction with the EIA (Electronic Industries Alliance) RS-232 standard, which specifies the electrical, mechanical, functional, and procedural characteristics of two data communication equipment.
And a little further:
A UART includes a transmitter and receiver. The transmitter is essentially a special shift register
Same goes for the description on Wikipedia, they essentially list what hardware elements UART interface should have.
Where does the software aspect come into play ? That's handled by the asynchronous serial protocol itself. The book 'Programming 16-Bit PIC Microcontrollers in C: Learning to Fly the PIC 24' provides very nice introduction in Chapter 8: in aviation you have precise protocol of how and what should be said, who talks first and second, etc., and this is the same for serial communication. Software will control the hardware supplied by UART to transmit - send start bit, the data, then stop bit - and when to listen.
The important bit to notice is that UART doesn't have to be tied to DB-9 connector - UART is not DB-9. You have nowadays Raspberry Pi, Arduino and whole lot of other embedded systems that use just 4 lines of wires. Sometimes there's USB to RS-232 converters. For instance, I've worked with PICDEM PIC18 board which can use either DB-9 or USB for serial communication. Serial data can be sent via Ethernet lines as well.