Welcome to Android Forums
Simplest way is to use Bluetoothbut if you want to connect a USB keyboard and mouse you'll need a "OTG cable" - a simple adaptor that plugs into the micro USB port of your phone and provides a standard USB port to plug (say) a keyboard in.
There are a couple of "gotchas" though: not all Android devices provide any power to USB, so depending on the device you may need to use andother USB adaptor cable that allows power to be upplied from an external source. Secondly you'll need to use a hub to provide more than one USB port if you want both mouse and keyboard, although some more expensive OTG cables have a built in hub and often a card reader as well. Lots of choice, just Google "OTG cable"
Personally I use a Bluuetooth keyboard I bought for the purpose even though I have OTG cables that I use to attach disks/card readers/USB sticks/whatever but diskike the cable clutter when I'm just using it as a PC.