A forum is a place where people can go online to have discussions with other people from around the world. The software lets them post answers and responses to one another in tandem, either using flat or threaded style formatting.
The role playing takes place when members of the forum each take on the identity of a fictional character. They then work together, responding back and forth in order to tell a story, which moves progressively forward as the various members respond to one another's inquiries.
As the story progresses the players can use either standard literary style to tell the story with quotation marks going around verbal responses from the character, while unenclosed text is used to indicate actions. In other forms, the text will be enclosed in some sort of literary marks, while the actual verbal responses are left unenclosed. The style you play will be determined by the specific site and its community guidelines.
In general other rules will apply to these games as well. Generally you won't be allowed to break character or go OOC (out of character) unless it's through private messaging. Sometimes there will also be a moderator that will direct the flow of the game. These people will often have their own thread specific rules which can be consulted on in private.
The interesting thing about forum role playing is that unlike in other forms, a forum allows the players to keep a record of their interactions, and the story that is created is almost a living book which is constantly growing and changing as more and more people participate.
This makes it as much an act of literary communion as it does a game. In the end the most important thing ends up being that the story you are telling is satisfying. This trumps the importance of keeping your own personal characters safe and out of trouble, or defeating other characters in tasks and challenges.