How do you format a chapter intended just for exposition? Let's say your worldbuilding is really hard to digest for most readers so you create one chapters just for that, what are the various way to write a chapter like that and how do you format it? I was thinking of writing a chapter where there are only descriptive paragraphs explaining various actors, the history and technology, but I am wondering if it can be considered to be a chapter at all and if it even makes sense to put it in the middle of the book. If it's never done like this, what are some other ways of doing it according to the writers of some popular books?
The short answer is, you don't put exposition in a chapter of its own.
Here are some questions on writing exposition you might find helpful:
- How to avoid the 'magic explanation' info dump in Fantasy novels
- How do I avoid a “mid-story info dump?”
- Should I "tell" my exposition or give it through dialogue?
And here are some other links:
- Writing 101: How to Use Literary Exposition
- Writing story exposition: Examples and tips
- Backstory and Exposition: 4 Key Tactics
- 25 Ways To Kick Exposition’s Ass (This one is foul-mouthed, it's Chuck Wendig after all, but contains some real pearls...)
If you check these out and still feel you need a chapter of exposition, here are some alternatives:
- Use footnotes
- Add a map
- Use an appendix (or twelve), such as:
- A chronology
- A genealogy tree
- A dictionary
- A list of characters (but this one mostly exists in stage plays... maybe screenplays...)
- Any other lists like a list of locations, items, religious rituals, songs, and anything else you cannot get rid of...
- Write an author's note
- Save it for your "Silmarillion" or your special reader's guidebook or your fandom wiki, etc.
I would never read all that as a single chapter. It's fine for you to write it all down in one place, but you need to figure out how to reveal it to the readers. There are two basic techniques and it's probably best to use both, revealing some one way, and some another:
have something happen in which your narrator drops an aside, or have two characters talk, in a way that lets the reader pick up your rules from context. "Josh grimaced as he saw the small green form of [moon 1] on the horizon. 'Extra careful tonight?' he confirmed to Susan." or "Josh removed his [weird technical piece of clothing important to your worldbuilding] and hung it up. He longed for the days he had heard of when nobody needed one."
have your character discover something, perhaps by being in a literal "school for magic"  where other characters teach them, perhaps by experimenting, perhaps by finding an old book. They either think to themselves a "stream of consciousness" as they do so, tell someone else what they're discovering, or the narration can just summarize. "Josh continued to practice with the candle flame until he could control it. It wasn't just about his breath, he learned, but more a matter of [part of the magic system.]"
You can start with the most important thing, or start with little details and work up to the big thing. You can have everyone know the basics, comfortable with magic wielders or ray guns or the system of government, or they can all be dumped in a new environment where no-one knows what's going on and why. Working out what to reveal when, and how to reveal it without pages of exposition, and yet without some constant reminder that this place is different and the reader doesn't know all the rules on every page, is vital to making your book a "gripping read".
 - This doesn't have to be Harry Potter. In the Recluce series, there are many books where our hero gets sent on a mission or to a monastery-like place to learn how to control his talents. The Wheel of Time series has all kinds of characters swept up by magic wielders to be taken to convent like schools where they are trained, and so on. It's easy enough to armwave that those who are very good at your magic can detect a wilder in action and head off to find them and rein them in. In a non-magic setting, the person who keeps breaking the rules about [whatever] can be jailed and re-educated, or forced into the army and re-educated, or sent on a dangerous mission with a grizzled old captain who helps them understand why their society is how it is, or whatever.
What you are describing sounds like an encyclopedia.
with entries on subjects detailed therein.
DUNE uses something akin with its dictionary of terms so we understand what a stoneburner is and why a maula pistol is useful. It also provides historical elements in appendices.
The Hitchhiker’s Guide to the Universe yields up timely exposition as entries from the eponymous book itself as the characters or narrator need information elided into the story.
With Dune, the reader can enjoy the story without ever turning to the appendices but if they chose to,they gain a richer story.
Whereas, HGTTU uses a wonderful wit to slide its exposition under our watchful gaze with our cheerful appreciation.
I’ve also seen in Stephen Brust’s works, histories added a single page flyleafs between chapters. Again, they can be skipped or read, as the individual is want to do, and the stories are still enjoyable.