Fact: If $X$ is a Hausdoff space, then any compact set $S\subset X$ is closed.
Proof: if $x\notin S$, then for each $s\in S$ we can find opens $U_s, V_s$ such that $x\in U_s$, $s\in V_s$, and $U_s \cap V_s = \emptyset$. Since $S$ is compact, $S$ is covered by some finite subcollection $V_{s_1}, \ldots , V_{s_n}$. It follows that $U_{s_1} \cap \cdots \cap U_{s_n}$ is an open neighborhood of $x$ disjoint from $S$.
Conversely, if all compact sets are closed in $X$, then points are closed, so $X$ is $T_1$. It follows that any topological space that isn't $T_1$ has non-closed compact sets.
Fact: A compact Hausdorff space is regular.
Proof: Suppose $x\notin C$, where $C$ a closed set. Since a closed set in a compact space is compact, we can proceed exactly as in the preceding proof to construct disjoint open sets $U,V$ with $x\in U$ and $C\subset V$.
In fact, every compact Hausdorff space is normal, which follows from iterating the above argument. But there are lots of non-regular compact spaces, like the two-point Sierpiński space. And gluing together two copies along the open point yields a three-point space that is neither regular nor normal.
Call a space $X$ "locally compact(1)" if every point has a compact neighborhood. Call a space $X$ "locally compact(2)" if every open neighborhood of a point contains a compact neighborhood.
Fact: If a Hausdorff space is locally compact(1), it is locally compact(2).
Proof: Without loss of generality, suppose that $X$ is compact, and take an open neighborhood $U$ of $x$. Since a compact Hausdorff space is regular, there is a closed neighborhood of $x$ contained in $U$. Since a closed set in a compact space is compact, the conclusion follows.
On the other hand, there are spaces that are even locally Hausdorff that are locally compact(1) but not locally compact(2), see here.
Fact: In a Hausdorff space, the intersection of two compact sets is compact.
Proof: Since any compact set is closed and any closed subset of a compact is compact, this is trivial.
There are lots of counterexamples for non-Hausdorff spaces. For example, we can take any compact connected Hausdorff space $X$ with at least two points, and let $U\subset X$ be a nontrivial open. Gluing two copies of $X$ along $U$ gives a space with an intersection of two compact sets homeomorphic to $U$. But $U$ is a non-closed subset of a Hasudorff space, so cannot be compact.
For example, if we glue two copies of $[0,1]$ along $(0,1]$ we get an interval with a doubled endpoint, a compact locally Hausdorff space, but such that the intersection $(0,1]$ of the two intervals is non-compact.