The patchbay is the main way to make connections to, from and within Ardour's mixer.
Notable exceptions are internal aux sends and connections to the monitor bus (if you are using one): these cannot be controlled from a patchbay, and are basically not under manual control at all.
The patchbay presents two groups of ports; one set of sources (which produce data), and one of destinations (which consume data). Depending on the relative number of each, the sources will be placed on the left or the top of the dialogue, and the destinations on the right or the bottom. Thus, in general, signal flow is from top or left to right or bottom.
Both sources and destinations are divided up into groups, with each group being given a tab:
The main part of the patchbay is a matrix grid. Within this grid, green dots represent connections, and you can click in any of the squares to make or break connections. You can also click and drag to draw a line of connections, which is sometimes useful for making many connections at once.
In the example patchbay shown above we can note various things. We are using the Ardour Tracks sources tab, so we see the output ports of the three tracks in our session: Fred, Jim and Foo. Our destinations are from the Ardour Busses tab, so we have the inputs of a session bus, Sheila, and the inputs of the master bus. Fred and Jim have stereo outputs, so have L and R connections. Foo is a MIDI track, so it only has one connection, and its squares in the grid are coloured light grey to indicate that no connection can be made between Foo (a MIDI output) and our busses (which are all audio-input).
The green dots in the example show that both Foo and Bar are connected to the master bus, left to left and right to right.
Slightly different versions of the patchbay are available from different places in Ardour. For a global view of all JACK audio connections, use Window > Audio Patchbay, or press P. A corresponding MIDI Connection Manager can be opened using P.
There is also a patchbay available when connecting individual tracks; clicking on the input or output buttons of a mixer strip will open a connection manager which has the corresponding track input or output as the only destination or source, with all other ports available for connection to it.
Context-clicking on a port name in the connection manager opens a menu which provides a few handy options: