Questions about Serial Communitcation

Okay, I want to set up a serial communication with my computer where I send a specific command to the arduino and the arduino then runs a task, like reading a sensor value, and then prints the value on serial. I only need it to take the value once and print that.

Can anyone help me?

The whole idea is to have a laptop and arduino communicating with Xbees, i send the command on the serial monitor to the arduino, which will be tethered to a balloon, to take altitude or temp readings from sensors and the arduino sends the values back to the laptop. Is this even possible or will I have to have a data logging type thing going?

Do you really need the the sensor measurement to be commanded by the PC? It would be simpler if you just designed the remote part of your system to output sample values at regular intervals, and have your PC application either receive them or ignore them as required? If you really need to command it then look at example sketches that send serial data to the Arduino and parse it at the Arduino - that's really all you're trying to do here.