An audio interface converts analog audio signals like those from your guitar or from a microphone into something your computer can understand. This process is called AD/DA conversion, or more simply analog to digital conversion.
Your audio interface takes your input signal – in this instance, the complex ‘real life’ sound of the guitar – then converts it into binary data that your computer can understand. The second section then takes the digital signal and converts it back into analog, so that you’ll then hear sound from your headphones or studio monitors. The wildly varying cost of audio interfaces is often down to the quality of the AD/DA converters – typically, the best converters come at a higher price, which is one major factor in why audio interfaces can vary so drastically in price.