There are two different ways to connect an electric guitar: in-line and through a combo amplifier (combo). Each of them is designed for a different purpose, and therefore, first of all, you need to think about what you want from a guitar sound.
It is necessary
Guitar, combo or other sound-amplifying device, cables for commutation. Effects pedals, guitar processor, mixer - optional
Instructions
Step 1
The inline connection is the input of the guitar signal to the line input of the amplifier. A computer, an acoustic system can be used as an amplifier. If you need distorted guitar sound (distortion) or other guitar effects, you can get them by connecting your guitar and amp to a stompbox or effects processor.
Also, sometimes a mixer is placed in front of the amplifier, this is convenient when you need to amplify several instruments and adjust the timbre characteristics of each of them. The connection diagram looks like this: the output of the guitar is connected to the input of the pedal or processor (if any), the output of the pedal or processor is connected to the input of the mixer (if any), the output of the mixer is connected to the input of the main amplifier.
Step 2
Connecting a guitar to a computer is generally done in the same way. Only as the main amplifier is the amplifier in the sound card used (and the amplifier in the speakers, if you are outputting sound from them). The cable is connected to the line-in of the sound card.
Step 3
Connecting to a combo amplifier differs only in that the preamplifier, tone block, overdrive effect, and sometimes other effects are already built into it. Therefore, your task is to connect the guitar output to the combo input. Connect an effect pedal or processor between them, if necessary.