Perhaps the simplest example is to let $p$ and $q$ be distinct points not in $\Bbb N$, let $X=\Bbb N\cup\{p,q\}$, make each point of $\Bbb N$ isolated, and give $p$ and $q$ open nbhds as follows. A set $U\subseteq X$ is an open nbhd of $p$ iff $p\in U$ and $\Bbb N\setminus U$ is finite, and $U$ is an open nbhd of $q$ iff $q\in U$ and $\Bbb N\setminus U$ is finite. Essentially we’ve just made $\Bbb N$ a sequence with two limit points, $p$ and $q$. It’s easy to check that $X$ is $T_1$, but $\{p\}\cup\Bbb N$ and $\{q\}\cup\Bbb N$ are compact sets that aren’t closed: they’re both dense in $X$.
This answer has a slightly more complicated example in which all convergent sequences have unique limits. And this answer has another more complicated example.