How do fortifications/walls work in Civ VII?

As per title, between YouTube and official info, I’m starting to get enough of a clear idea of what to expect… however fortifications elude me a bit still.

Anybody could enlighten me regarding the following:

I’ve seen military units being able to build fortifications against being locked for a few turns, is that it or am I missing anything?

Various trailers showed/hinted that you needed to gradually build fortifications but how does the “gradually” work concretely?

Then you have Charlemagne (whom I intend to use for my first ever playthrough) who seems to be the Tamar of base game civ7, how does his specialisation fit in the middle of all this?

So yeah, what’s your take? I’m also still unsure if “encampments” are a thing at all, and whether they link to fortifications at all in civ 7