This is actually somewhat complicated in general, and requires some hypotheses on the space $X$. Namely, $X$ must be completely regular, so if your construction does not use this hypothesis it will not in general give the Stone-Cech compactification. See section 1.34 onward of Russel C. Walker's book "The Stone-Cech Compactification." I believe the ultrafilter construction is initially due to Waldhausen, but Walker's exposition is very readable and I can't find the Waldhausen paper.
The upshot is that in general one wants to consider ultrafilters of zero sets of $X$, rather than ultrafilters of closed sets in general. This is necessary because the closed sets of a non-normal space don't behave nicely--in particular, they aren't separated from one another by continuous real-valued functions. But if you look at the universal property of the Stone-Cech compactification, this is exactly the relevant type of separation, so one needs to look at zero sets instead.
EDIT: In response to Qiaochu's comment, I'm going to make some fuzzy remarks on how much of the topology of a topological space $X$ the category Top sees, as opposed to how much of the topology of $X$ the category of compact Hausdorff spaces sees (call this KHaus). I won't be as formal as possible because I think doing so would risk obfuscating some subtle points--but to point in the direction of a formalization, note that there is a functor $F: Top\to [Top, Sets]$ (where $[-,-]$ denotes the functor category), and a functor $G: Top\to [KHaus, Sets]$ where both functors are given by $X\mapsto \operatorname{Hom}(X, -)$. The question I want to address is---how much of the topology on $X$ can we recover from the functors $F(X), G(X)$?
Now for the first question, Top sees everything about a topological space $X$. This is obvious from the Yoneda lemma, but more explicitly, one can consider the two-point space $A=\{x, y\}$, where the open sets are $\emptyset, \{x\}, \{x, y\}$. Then $\operatorname{Hom}(X, A)$ gives exactly the open/closed sets of $X$, and one can even extract the (closed) sets themselves by taking the pullback of diagrams of the form $X\to A\\leftarrow \{y\}$.
But note that the space $A$ is not contained in KHaus, since $x$ is not a closed point. One should think of KHaus as only seeing "zero sets," or more generally level sets, of functions on $X$. Indeed, given any function $f: X\to Y$ in KHaus, one may extract the level set $f^{-1}(y)$ by taking the pullback of $X\to Y\leftarrow y$ (which may not exist in KHaus, but one can see the functor it represents). On the other hand, if $S$ is a closed subset of $X$ which is not the level set of any function, how do we see it? For example, $\operatorname{Hom}(A, Y)=\operatorname{Hom}(pt, Y)$ for any compact Hausdorff space $Y$---KHaus does not distinguish these two spaces.
The upshot is that KHaus only "sees" zero sets (or more generally, level sets of functions), so any natural functor defined out of KHaus will be built from them, rather than arbitrary closed sets.
EDIT 2: This is an attempt to address Qiaochu's Edit #2. I claim that it suffices to quantify over spaces of cardinality at most that of $X^{\mathbb{N}}$. Indeed, let $C$ be any compact Hausdorff space, and $f: X\to C$ a function. Then it factors through $\overline{f(X)}$ which is closed in $C$ and thus compact Hausdorff, and has cardinality at most $X^\mathbb{N}$. So it suffices to quantify over compact Hausdorff spaces of bounded cardinality.
To see the claim about the cardinality of $\overline{f(X)}$, note that $f(X)$ has cardinality at most that of $X$, and there is a surjective map from convergent sequences in $f(X)$ to $\overline{f(X)}$ (namely taking the limit). But convergent sequences in $f(X)$ are a subset of $f(X)^{\mathbb{N}}$.
Now the class of isomorphism classes of compact Hausdorff spaces of bounded cardinality (or indeed, of topological spaces of bounded cardinality) is clearly a set, which lets the quantification go through.
EDIT 3: Qiaochu points out that I assumed the existence of a locally countable base in the last edit---we can't say that every point is the limit of a sequence; instead one needs to say it's the limit of an ultrafilter. This gives a larger bound on cardinality, but still a bound.
We can also describe $\beta(\mathbb{Z},\mathcal{T})$ in terms of ultrafilters on Boolean algebras. I claim that $\beta(\mathbb{Z},\mathcal{T})$ is the space of ultrafilters on the Boolean algebra of clopen sets in $(\mathbb{Z},\mathcal{T})$ where $\mathcal{T}$ is the Fürstenberg topology.
Recall that a space $X$ is zero-dimensional if it has a basis of clopen sets, and recall that a zero set on a space $X$ is a set of the form $f^{-1}(0)$ for some continuous $f:X\rightarrow\mathbb{R}$. A completely regular space $X$ is said to be strongly zero-dimensional if the Stone-Čech compactification $\beta X$ is zero-dimensional. It can be shown that a completely regular space $X$ is strongly zero-dimensional if and only if whenever $Z_{1},Z_{2}\subseteq X$ are disjoint zero sets, there is a clopen set $C\subseteq X$ with $Z_{1}\subseteq C,Z_{2}\subseteq C^{c}$ [1 p. 85]. In other words, a completely regular space is strongly zero-dimensional iff every pair of zero sets is separated by a clopen set. If $X$ is zero-dimensional, then let $\mathfrak{B}(X)$ denote the Boolean algebra of clopen subsets of $X$ and let $\zeta X$ be the space of ultrafilters on $\mathfrak{B}(X)$. Then $\zeta X$ is in a sense the maximal zero-dimensional compactification of $X$ which is called the Banaschewski compactification. If $X$ is strongly zero-dimensional, then the Banaschewski compactification $\zeta X$ is precisely the Stone-Čech compactification. In [1. p. 86] it states that zero-dimensionality and strong zero-dimensionality are equivalent in Lindelöf spaces. Therefore since $(\mathbb{Z},\mathcal{T})$ is zero-dimensional and Lindelöf, the space $(\mathbb{Z},\mathcal{T})$ is strongly zero-dimensional. We conclude that $\beta(\mathbb{Z},\mathcal{T})=\zeta(\mathbb{Z},\mathcal{T})$ is the space of ultrafilters on $\mathfrak{B}(\mathbb{Z},\mathcal{T})$.
In order to clear up some confusion about the space $(\mathbb{Z},\mathcal{T})$ and its Stone-Čech compactification, I will outline some basic facts about $(\mathbb{Z},\mathcal{T})$ and $\beta(\mathbb{Z},\mathcal{T})$.
I claim that the space $(\mathbb{Z},\mathcal{T})$ has an infinite partition into clopen sets. It is not too hard to give an explicit example of such a partition. For a more slick proof, assume that $(\mathbb{Z},\mathcal{T})$ has no partition into countably many clopen sets. If $\mathcal{U}$ is an open cover of $\mathbb{Z}$, then there is a clopen cover $\{C_{n}|n\in\mathbb{N}\}$ that refines $\mathcal{U}$. If we set $D_{n}=C_{n}\setminus(C_{0}\cup...\cup C_{n-1})$ for all $n$, then $\{D_{n}|n\in\mathbb{N}\}$ is a partition of $(\mathbb{Z},\mathcal{T})$ into finitely many clopen sets that refines $\mathcal{U}$, so $(\mathbb{Z},\mathcal{T})$ is compact. This is a contradiction. Therefore $(\mathbb{Z},\mathcal{T})$ has a partition into countably many clopen sets.
In particular, there is a continuous surjective function $f:(\mathbb{Z},\mathcal{T})\rightarrow\mathbb{N}$ where $\mathbb{N}$ has the discrete topology. Therefore the map $f$ extends to a continuous surjective function $\bar{f}:\beta(\mathbb{Z},\mathcal{T})\rightarrow\beta\mathbb{N}$. Since $|\beta\mathbb{N}|=2^{\mathbb{c}}$, we conclude that $|\beta(\mathbb{Z},\mathcal{T})|=2^{\mathbb{c}}$ as well. We conclude that the Stone-Cech compactification $\beta(\mathbb{Z},\mathcal{T})$ is much larger than the pro-finite completion of $\mathbb{Z}$.
[1] The Stone-Čech Compactification, Russell Walker (1970)
Best Answer
In this paper (Spaces $N\cup\mathscr{R}$ and their dimensions, Topol. Appl. 11(1) 1980 93-102) — I hope the PDF is freely available) Jun Terasawa constructs maximal almost disjoint families on $\mathbb{N}$ whose associated spaces can have any dimension you want. Given an almost disjoint family $\mathcal{A}$ on $\mathbb{N}$ one defines a topology on the union $\mathbb{N}\cup\mathcal{A}$ by declaring each natural number to be isolated and giving each $A\in\mathcal{A}$ a countable local base by putting $$U(A,n)=\lbrace A\rbrace \cup \lbrace i\in A:i\ge n\rbrace$$ for each $n$. This space is locally compact and zero-dimensional but Terasawa could arrange it so that its Čech-Stone Compactification would contain the Hilbert cube, for example.
Dowker's example does have a locally compact version: Let us retain the notation of Dowker's paper and use $T$ to denote the set of countable ordinals and $Q_\alpha$ to denote the $\alpha$th congruence class as chosen by Dowker. In addition let $\mathbb{A}$ denote Alexandroff's double arrow space. This is the product $[0,1]\times\lbrace0,1\rbrace$, ordered lexicographically and endowed with its order topology and with the two isolated points $\langle 0,0\rangle$ and $\langle 1,1\rangle$ deleted.
Now consider the product $T\times \mathbb{A}$ and define a quotient space $X$ by identifying the points $\langle \alpha,x,0\rangle$ and $\langle \alpha,x,1\rangle$ whenever $x\notin\bigcup_{\beta\ge\alpha}Q_\beta$.
It is elementary to verify that this is an upper semicontinuous decomposition and that the resulting space is locally compact and zero-dimensional. The key observation is that for every $\alpha$ the product $T_\alpha\times\mathbb{A}$ is compact and open in the domain and its image is compact and open in $X$.
Furthermore, arguments similar to those given by Dowker will show that each finite open cover of $T\times\mathbb{A}$ has a refinement of the form $\mathcal{U}\cup\mathcal{V}$, where $\mathcal{U}$ is a disjoint open cover of $T_\alpha\times\mathbb{A}$ for some $\alpha$ and $\mathcal{V}$ consists of finitely many sets of the form $T\times C$, where $C$ is a clopen interval in $\mathbb{A}$.
The latter can then be used, just as for Dowker's $M$, to show that the bottom and top lines in $X$ cannot be separated by clopen sets and hence that $\beta X$ is not zero-dimensional.