ございます is basically just the masu-form of the verb ござる, which is a humble version of ある.
"There is a book here":
- ここに本がある。 (plain)
- ここに本があります。 (polite)
- ここに本がござる。 (sounds like a samurai)
- ここに本がございます。 (very polite and respectful)
These words behave like a copula (だ, "to be") in combination with で. I can say they no longer mean "to exist", but it's hard to explain why.
"This is a book.":
- これは本である。 (stiff/formal/academic)
- これは本であります。 (polite, sounds like a politician or a military personnel)
- これは本でござる。 (humble, sounds like a samurai)
- これは本でございます。 (very polite)
(ござる is an irregular verb and its masu-form is normally ございます, although ござります is occasionally used.)
Technically, they can also follow the ウ音便 of i-adjectives (e.g., 高うあります, 面白うござる), but we seldom see this happen today. (ウ音便 itself has become uncommon.) We don't need a copula for an i-adjective, so I think this type of あります/ござる/ございます is merely for showing respect or politeness, just like how we use です with an i-adjective. Instead of おいしゅうございます/おいしゅうござる, we normally say おいしいです now (see this discussion).
Still, something like 高くある is occasionally used in modern Japanese, and they have special connotations ("to stay", "will"). See this question for examples: i-adjective modifying ある (eg 強くありたい).