Selecting notes with the mouse
While in Draw mode or Internal Edit mode, any note can be clicked to select it. Once a note has been selected, Left-clicking on another selects all notes between them. Adding or removing a note to/from the selection is done by Left clicking it.
In any mode, left clicking on a note on the Scroomer (the piano header of the track, see MIDI Track Controls) will add all occurrences of that note to the selection, while middle clicking will only select/deselect all occurences of that note, clearing the selection. These Scroomer selections works on all MIDI regions of the track at once.
In Internal Edit mode only, left clicking and dragging outside of a note rubberband selects a series of notes. rubberband selecting adds the notes to the selection.
Tab selects the next note as defined by their starting time. Tab selects the previous note. Tab or Tab adds the next/previous note to the selection.
Listening to selected notes
If Edit > Preferences > MIDI > Sound MIDI notes as they are selected in the editor is enabled, Ardour will send a pair of NoteOn/NoteOff messages through the track, which will typically allow to hear each note as it is selected.