The internal exchange is a decentralized exchange (DEX) on the Hive blockchain. It is part of the base layer code. Here is where people are able to swap $HIVE for HBD and vice versa. It does use an order book similar to centralized exchanges.
There are no transaction fees associated with trades occurring on the internal exchange. Also, since Hive uses the Resource Credit system, there are no direct "gas" fees associated with posting the transactions to the blockchain.