Researchers in the video below filled an ant colony with concrete and dug it out to see just how exactly the colony was organized underground. The results are just plain awesome. Ants farm fungus and use livestock (aphids), build cities and wage wars. What the video refers to as a hive consciousness is emergent behavior: each ant following a series of simple rules results in a collective behavior that appears to be driven by a single conscious mind.
This reminds me of one of my favorite books growing up: City by Clifford D. Simak. Simak seems to be a virtually forgotten author these days, though you can occasionally find his books in a Barnes & Noble (and of course, widely available online). City was probably his best work and had an incredible vision (it was written in 1952). I won’t spoil much, but he introduces the idea of a colony of ants that is given the opportunity to survive many winters. They learn to produce heat on their own and make several appearances as the tale unfolds over hundreds of years. I highly recommend it and it’s one of my favorite sci-fi books of all time. I’ve also read The Goblin Reservation and The Visitors by him and I can recommend the former. The latter I still enjoyed, but if you are going to check out anything he has done, make that the third choice. Simak has an easy-to-read style that incorporates fantastic elements into what would otherwise be hard sci-fi, raising interesting philosophical questions in the process.