Can someone explain the connection between them? For example i have read about Hofstadter's MIU System and don't know how it relates to first order logic. What do formal systems and first order logic have in common? What is the difference between them?
"First-order logic" is a relatively well defined family of systems. Apart from minor differences, "first order logic" as described in one contemporary book is equivalent to "first-order logic" as defined in another.
"Formal system" is not very well defined. It is a general, informal term for various sorts of systems that are studied in logic, philosophy, and computer science. One thing that most of these have in common is a rigorously defined set of "sentences", "formulas", "expressions", or similar. After that, they differ wildly.
Some have inference rules, som do not. The inference rules can be very different.
Some have a notion of semantics or truth values, others don't. When they do have a notion of semantics, it can be extremely different from one system to another.
So the relationship is that first-order logic is one way of making the informal notion of "formal system" precise, but there are many other things called "formal systems" that are not first-order logic.
In some contexts, authors do give a more rigorous definition of "formal system" for their own purposes. But any definition like that will vary from one author to another, and should not be taken as a general definition that applies in all contexts.
One place that a more general notion of "formal system" or "abstract logic" is used is in Lindström's theorem, which characterizes first-order logic among a broader class of "abstract logics". The definitions are sketched in a paper "Lindström’s Theorem" by Jouko Väänänen (Universal Logic: An Anthology, Springer, 2012, 231-236). The definition of "abstract logic", though, still does not include everything that could be called a "formal system".