GarageBand isn't just good for recording, you can also use it as a space-saving practice amp for listening to your guitar or keyboard through headphones. To get the best results, you need to connect an electric instrument such as a guitar or a keyboard directly to your iPad.
Can you plug a guitar straight into an interface?
https://www.youtube.com/watch?v=yTN3fYqqySM
Do I really need an audio interface?
Answer: Yes, you need an audio interface, even when you make beats or electronic music. The main reason is because of the audio quality which is needed for professional music production. This quality is lacking in most sound cards shipped in laptop and desktop computers.
Can I plug my guitar straight into GarageBand?
https://www.youtube.com/watch?v=CT5RNHEX43M
How do I use audio interface with GarageBand?
https://www.youtube.com/watch?v=pT4wEIGWMjw
What audio interfaces are compatible with GarageBand?
How do I change the audio interface in GarageBand?
If you're using a microphone connected to an audio interface, choose the channel number for the microphone. If the audio interface channels don't appear in the menu, choose GarageBand > Preferences, click Audio/MIDI, then choose the audio interface from the Audio Input pop-up menu.