The closure of X is the intersection of all closed sets containing X, and is necessarily closed. The closure contains X, contains the interior.
The boundary of X is its closure minus its interior. Equivalently, the boundary is the intersection of closed sets containing X and closed sets whose complement is contained in X. Thus the boundary of X is closed.
If you think of a blob in the plane, the interior is the blob with its edges removed, the closure is the blob with its perimeter, and the boundary is the perimeter alone. However, there are some contrived spaces in which a boundary can contain an open set.
Let a space contain the real line and the points p and q, and let a set be open if its intersection with the line is open, and it contains both p and q or neither p nor q. A set containing only p or only q can be neither open nor closed. Let X be some interval union p, hence the boundary of X contains the set p∪q, which is open.
The boundary of an open set cannot contain an open set.