A keyboard was a data entry device with a number of letters and/or numbers on it used in conjunction with a computer.
On Earth, they were initially used in the 20th and 21st centuries with early computer technology, and based on the typewriter.
When Montgomery Scott and Dr. McCoy visited Plexicorp after traveling back in time, Scotty didn't realize that the computers of 1986 still used keyboards to enter information, and tried to access a voice interface. When Dr. Nichols told him to use the keyboard, Scotty noted "Keyboard… how quaint…" and quickly typed up the molecular formula for transparent aluminum. (Star Trek IV: The Voyage Home)
Based on how quickly Scotty could type, this implies he had some sort of former experience with the "quaint" technology.
Another time travel encounter with this technology occurred when Chakotay and Captain Kathryn Janeway had to navigate their way through Henry Starling's computer in 1996. Janeway "pecked" at the keys (pressing one key at a time, slowly, as opposed to typing with most fingers rapidly) as she said that she didn't take the "Turn-of-the-Millennium Technology" class at the Academy. (VOY: "Future's End")
During the 22nd century, a different form of the keyboard was used on most Earth Starfleet ships, such as Enterprise. A keyboard of this type was in front of the computer monitor in each officer's quarters. (ENT: "The Seventh")
By the 24th century, traditional keyboard interfaces had mostly been replaced with LCARS touch-sensitive controls that could be altered to individual taste. They were traditionally kept in a panel style. Ezri Dax had a keyboard-style LCARS panel computer in her quarters that she used occasionally, such as when she researched the personnel files of Hector Ilario and Greta Vanderweg. (DS9: "Field of Fire")
In 2384, Jankom Pog hoped to find a keyboard or a joystick aboard a dormant Borg cube, anything that he could use to establish an interface in order to hack their systems. (PRO: "Let Sleeping Borg Lie")
Starfleet of the 24th century typically used voice interfaces or the touch screen panels themselves, so presumably keyboard-style panels weren't standard.
In the script for "Where No One Has Gone Before", the touch screen panels in engineering are identified as keyboards.