Firstly, does your USB keyboard have MIDI out (DIN) sockets as well... ...or is it USB only?
If it is USB only, then it is possible to get a hardware converter (from USB to traditional 'DIN' MIDI) that should work as long as the USB Midi keyboard is 'class compliant'.
an example is http://www.kentonuk.com/products/items/utilities/usb-host.shtml .
Once you have a traditional (DIN) MIDI connection, you'll be able to use any midi sound module.
Many years ago, these boxes were the most usual thing to use with a midi keyboard - often with a computer-based midi sequencer in between.
These modules are also sometimes called 'expanders'.
You'll want to pay attention to the type you get.
Many modern hardware midi modules are analogue-style synthesizers that are marketed as benefitting from having physical controls, the assumption being that people will get their 'bread and butter' sounds (pianos, strings, etc.)
from their computers these days.
These analogue style sounds may be exactly what you want, but even so you may want to be careful that you don't choose something with polyphony that is too limited for what you want to play.
It may be that looking at the second hand market will give you something closer to what you need.
Some examples (purely examples, not recommendations) of older 'Sample + Synthesis' modules that should have a selection of sounds for jamming are...
The Roland JV-1080: The Korg X5DR: Of course when buying something that may be 20 or more years old, you'll want to consider that reliability may be an issue before laying your money down.
music.stackexchange.com/users/18896/topo Reinstate Monica
If you want to go really cheap, I found this little sound module on Amazon that costs only £50.
Haven't tried it, but it should get the job done.
Accepts both USB and MIDI as an input and in the product description states that it can power up a MIDI keyboard.
Ammoon Midiplus MiniEngine , and Ammoon MIDIPLUS MiniEngine Pro
music.stackexchange.com/users/40011/m.spyratos
If you're willing to do it DIY, single board computers like a Raspberry Pi have enough processing oomph to act as (simple) synthesizers.
They come with a USB and sound ports, it's just a matter of piecing together the midi driver and a synthesis engine software.
Some examples of Pi based synthesizers can be found here .
music.stackexchange.com/users/2639/Dave
I did something just like this recently.
I have an AKAI MPK Mini and an iPhone 6s and wanted to connect them.
I bought this lightning to USB adapter and it works just fine with a variety of keyboard apps on my phone.
With the headphone jack you can output the sound however you like.
The only caveat is you can't charge the phone while the MIDI controller is plugged in, so the phone's battery might get drained pretty quick.
If your MIDI controller is USB and you have a smartphone, you can likely get something similar to connect them.
music.stackexchange.com/users/40025/jeffersonlam
what a false legend.
since early 2016 you can get the "Lightning USB 3 Camera-Adapter" for less than 50$. With that you can charge while having connected your iPAD to any USB keyboard , USB hub or whatever USB/MIDI device you want.
If the device needs more power than a few tolerated milli amperes, put an additional, powered USB hub (~ 20$) in between.
But with or without such a hub, you can power/charge your iPad through the "Lightning USB 3 Camera-Adapter" while communicating with USB device(s).
The only real complaint I have with IOS is, they don't offer a firewall, so every freaking APP involved in your MIDI/AUDIO chain can telephone your musical ideas (just a few kB) home and offer them as "chord/melody assistents" to the world, before you have copyrighted your own ideas.
So use Apple/IOS/itunes products with a grain of salt.
(MacOS has firewall though, just the IOS hasn't).
Have fun.
music.stackexchange.com/users/42766/LightningUSB3 CameraAdapter
If you have an iPhone, you can run it through GarageBand using a USB-Lightning adapter.
But it will de-charge a phone pretty quickly.
music.stackexchange.com/users/24821/Greg
If you have an iOS device (iPhone, iPad, iPod), you can connect your keyboard to it via Lightning to USB Camera Adapter (the new MK0W2AM/
A model can charge device at the same time) and download some apps listed on this website: iOS Keyboards Apps
You can use these apps with DAW (Digital Audio Workstation) or standalone (check app description).
Some of these apps is free: iOS Free Keyboards Apps
music.stackexchange.com/users/47903/baduga
I have a USB MIDI keyboard which is totally useless when not plugged in into a PC and playing a digital instrument. Is there a cheap way, for example some type of box which has predefined sounds, synthesizers, pianos etc on it and a box integrated or 3.5mm out?  Sometimes I would just like to jam a bit like I used to with my old Yamaha keyboard without powering up the PC.
Cheap way to make sound from a MIDI keyboard, without PC
music.stackexchange.com
<keyboard><midi><midi-controller-keyboard><live-sound>
music.stackexchange.com/questions/42394
music.stackexchange.com/users/3277/JustGoscha
A MIDI keyboard can be plugged into a single board computer like a Raspberry Pi, an iOS device and it can be used with iOS Apps. Single board computers like a Raspberry Pi have enough processing to act as (simple) synthesizers and iOS devices could help too
Single board computers like a Raspberry Pi have enough processing oomph to act as (simple) synthesizers. Some examples of Pi based synthesizers can be found  here If you have an iOS device (iPhone, iPad, iPod), you can connect your keyboard to it via Lightning to USB Camera Adapter. You can use these apps with DAW (Digital Audio Workstation) or standalone. Some of these apps is free.