I want to know if I record directly from my pc into audacity. i.e. using my guitar connected to my pc then open audacity and record.
On a Mac, yes. You can plug your guitar pickup or the output of your amp directly into the Stereo Line-In of your built-in sound card. Both work and give you different sound. You can set levels with Apple > System Preferences > Hardware > Sound > Input. Or using the Audacity Device Drop-Down menu. It’s easy to overload the system with too much sound, so be careful. Overload distortion is permanent.
In all cases you’ll need to figure out a way of plugging a mono guitar pickup (for example) into the stereo Mac. If you only get one channel of the stereo show, you can make the second one in Audacity with Edit > Duplicate and then Make Stereo from the left-hand drop-down menus. “Y” cables work, too.
Please note that if you elect to mic the cabinet, you’re going to pick up the room noises and echos, too. That and you need a Mic-Pre or mixer.
You can hear the Mac in almost-real time by selecting Software Playthrough in the Audacity Preferences. It’s not perfect and Headphones are strongly recommended.
Once you get a single track down, you can do multi-track/overdubbing, too.
You posted in the Mac forum. This stuff doesn’t work on a Windows machine. Koz