You can record your guitar by so many different ways.
One thing you should note is that, an electric guitar has a high impedence output, that means you need to plug your guitar into a high impedence input like that of a guitar amp.
One way is to record the sound from your speaker cabinet with a microphone.
i.e ElecGuitar to Guitar amp to Cabinet to MIc to Preamp to Recorder/MIxer or to PC via USB interface.
Or, you can record dry by pluging into a high impedence input directed to a recording chain(no preamp).
i.e. Elec Guitar to DI BOX to MIxer to Recorder
or Elec Guitar to USB Interface with HI Impedence input(Guitar IN).
You can add further processing to the dry signal.