How do archaea relate to eukaryotes and bacteria?
The relationship between the three is so overly complicated because of horizontal gene transfer, i.e. cells sharing parts of their genome with others instead of the normal passing-down to the next generation. This works between eukaryotes, archaea and bacteria and causes the mixing of the three.

An overview (originally proposed by Woese et al):


Bacteria are simplest considering cellular organisation. They have no nucleus or other internal membranes and no cytoskeleton. Their DNA is generally "junk-free"* (i.e. no introns), not bound by histones ("organising" proteins) and the organisation of regulatory sequences is relatively straightforward, typically with one 'operator' sequence before a gene.
Eukaryotes are complex cells in comparison. They have a nucleus and are full of internal membranes (ER, golgi, vesicles,...). Their complex cytoskeleton allows them to grow very large in comparison. Their DNA is usually full of more or less "junk"*, organised into tight bundles by histones and they tend to have a ridiculous amount of regulatory sequences way before, just at the start and even inside genes. Very importantly, they possess endosymbionts as you mentioned - mitochondria or plasmids, derived probably from some protobacterium.
Archaea at first appear to be a mixture between the two. A nice way to sum it up (though not very accurate) is "eukaryote in a bacterium's clothing". Their cells look a lot like prokaryotes because they are similar size, have no nucleus, endomembranes or cytoskeleton. However, some archaeas' DNA is bound by histones and they use similar machinery as eukaryotes for DNA replication, transcription and translation.


One possible explanation for this (theory by Margulis &amp; Schwartz as explained by my tutor) is: From the last universal common ancestor, first prokaryotes and archaea diverged. After this branching, the differences in genetic machinery evolved. Archaea then branched, producing a protoeukaryote line which went on to endosymbiosis with some protobacteria. That would explain the similarities I outlined above: similar cell structure between archaea and prokaryotes but similar genetic machinery between archaea and eukaryotes.

It gets a bit more complicated though, because archaea and bacteria can exchange genetic material, and eukaryotes incorporated a lot of their endosymbionts' DNA in their own genome, so you end up with all of them having a huge mix of genes from the others.

Edit: Genetic machinery refers to the enzymes used for DNA replication and transcription (DNA and RNA polymerase and the transcription initiation factors) and translation (ribosomes and several other translation factors involved). For example: Prokaryotes only have one type of RNA polymerase which uses sigma factor to bind the initiaion site. Eukaryotes and archaea both have three types of RNA polymerase which use TATA-binding protein for initiation. Or: In Prokaryotes, the translation start codon codes for formyl-methionine while in eukaryotes and archaea it codes for "normal" methionine. (Source)

*) Unrelated to your question, but in my own defence: I am aware that the usage of the word "junk" is somewhat unaccepted nowadays, because it supposes that there is "useful" and "unuseful" genetic material. Also, some of what was thought to be junk has been identified to have regulatory function etc. However, it's also a fact that a lot has been identified to have no function to the cell whatsoever, most of it parasitic DNA which is dead or still happily replicating away (LINEs and SINEs). That is, "junk" to the cell.