A keyboard is a hardware device used to input text, numbers, and commands into a computer. A mouse is a pointing device that allows you to move a cursor on the screen and interact with elements by clicking, dragging, and scrolling.