Q:

Do desktop computer motherboards have GPIO? If they do, how to read from or write to them

I've seen some pins like microcontroller's GPIO pins on the desktop computer motherboards for a couple of times, I wanted to know, first, are they really GPIOs? if yes, is it possible to read from or write to them?

A:

Normal PCs don't have GPIO as such in the sense of "pins intended to be general purpose". The connectors on a PC motherboard (whether internal headers or external ports) were all designed for specific functions. However, some of them can be repurposed for your own ends.
The closest thing to GPIO that PCs have is probably the parallel printer port which has a number of data lines and handshake lines. These lines are somewhat like GPIO pins, though you have less flexibility in terms of their directions. http://retired.beyondlogic.org/spp/parallel.htm
The handshake lines on serial ports can also be used as general IO, though they have weird voltage levels. 
Parallel and serial ports are less common than they used to be, but it's still pretty easy to find motherboards that have them if you shop around.
You may also be able to repurpose inputs and outputs intended for case LEDs, buttons etc, but I would imagine the details will be very specific to a particular system.
PCs use an I2C based bus called SMBUS for various management functions. I'm sure I've seen reports of people putting their own I2C devices on this bus through soldering wires to it before, but I can't find links right now.
There's another I2C bus on the video ports used for monitor identification. Whether you can get software access to it depends on what OS and video hardware you are using http://www.instructables.com/id/Worlds-Cheapest-I2C-I-Squared-C-Adapter/step5/Software-and-Projects/
And of course, there is USB. There are now cheap microcontrollers with USB interfaces which you can use to connect to this.

A:

I know this is an older topic, but anyway...
Having programmed BIOS code, I can say that every motherboard has GPIO's and they are completely available in the user address space and the port address is usually very close to the parallel port. I've made custom drivers for custom motherboards using standard parallel port drivers, all I had to do was modify the address number, but I knew that number in advance.
Can you use them? Well that depends on the person that programmed the BIOS. The state of all GPIO's has to be set pre-compile, all unused GPIO's could be easily set to be disabled.
If a GPIO is unused and unset, what is its default state? Quite likely just floating (most are tri-state so good luck)..
Does a GPIO have a pullup/pulldown? Who knows if the EE added one.. 
Are there traces for any of the unused GPIO's? I doubt it, but hey anything is possible..
In short, you have to get lucky that an unused GPIO has been set in a manner that you can use it; much like arduino (but without real defaults), think "INPUT/OUTPUT/TRI". It has to have a usable trace on the motherboard that hopefully has a pin or pad to solder to. Then if you know the address location of the GPIO you can use a standard user space driver easily.

