Once an instrument is equipped, you can play notes by using the numpad (by default). You can also hold Numpad+ to play a sharp note and NumpadEnter to shift down an octave.
Playable instruments should support MIDI input by default, this should include digital pianos and drum kits. To use it simply equip an instrument, ensure MIDI input is enabled in the Options Screen and start playing!
All instruments support MIDI input in some way, but the piano has the biggest range of supported inputs.
.mid files are files that store a series of MIDI inputs that can be played back later. Rust supports playing these back natively. To play a .mid file, you should place the target file into the /instruments folder of your game directory. If the folder doesn't exist you should create it.
Once the .mid is in the folder, equip an instrument and use the command
instruments.playrecording <filename> with no extension. You could also bind that command to a key for easy access with
bind n instruments.playrecording filename