If you have a recent Ubuntu Linux install, then you will be using Pulse Audio as a way to manage your audio. If you have something plugged into the microphone input (i.e. a microphone), then you can record from it with gstreamer very easily.
The element is
pulsesrc and it can be used like this:
gst-launch-0.10 pulsesrc ! audioconvert ! autoaudiosink
This will take input from the microphone, and play it back to you.