Prolog is a logic programming language. Programming in Prolog is quite different from programming in imperativeprogramming languages like C++ or Java. I personally like the SWI implementation of Prolog, which can be downloaded from: here. Ubuntu (my favorite Linux distribution) has SWI-Prolog in the Synaptic Package Manager (swi-prolog).
There are many webpages on Prolog, but the best I have found so far is Adventure in Prolog. This tutorial give a good introduction to Prolog and in the end you will have a working text adventure game!