A guitar recording will sound different almost anything you do. From instrument setup, to the equipment and how its used, to how the audio is mixed and mastered in the track will affect how the sound is perceived by the listener.
Getting sounds right at the source is the top priority of guitars, engineers and producers. You have to have the guitar setup right including proper string clearance and truss rod adjustment, tuning and adjustment of intonation and action are imperative to getting a good sound. A guitar that stays in tune and produces clean in-tune chords and notes is a keeper for life.
From the guitar itself and how the tone knobs and setup, we go to the cable and amp. In general, super fancy cables are not necessary. Usually electric guitar is recorded with an amp. In the case of acoustic guitar, we usually place a mic on the guitar itself, but for amps, you can experiment with different mics, and mic placement to determine the sound for your music.
Sometimes guitar can be recorded with DI box or using amp simulators. While the idea seems to be more common now than in the past, many guitarists still like to use a traditional amplifier, and a microphone is almost always the best choice for acoustic guitar, except for live sound, when DI is generally way better for reducing feedback in a PA system.
Pedals, different amps, and effects can be used to get a wide variety of sounds, also, in the mix process we can add even more effects, or balance the tones with EQ for further optimizing.
Many times, we will layer or do different tracks in the recording studio, so you can have the full advantage of as many takes and easy punch ins as you want. We can layer guitars in the mix and take advantage of stereo techniques and effects at different parts to further enhance the song depth and complexity.