Clock in a sealed box at half the speed of light. How would it know it is moving?

Consider a clock enclosed in a sealed box here on earth syncronized with my wrist watch. I send the boxed clock around the galaxy a couple of times at half the speed of light (or the full speed of light..). I hear that the clocks will be out of sync when the boxed clock comes back on earth.
Is that true?
How would the boxed clock know it was moving when it was actually stationary in reference to the box?
I hear explanations about how when traveling from point A to point B, time and space became one. I do not understand that, but that's besides the point. In this question point A is same as point B. So the clock has come back to where it started. Does the time for the moving clock somehow come back to be in sync with the wrist watch ?
Would the effects of departing the earth at c cancel out because of the effects of approaching when the jurney is over?

• You just can't go $c$, but you can get very close. We're doing do right now in the reference frame of an ultra-high-energy cosmic ray. That each of your clocks always "sees" the other clock ticking more slowly, yet clock B experiences less time than clock A when they are reunited is called "The Twin Paradox"--on which you can find plenty of explanation, videos, etc. geared for any level.
– JEB
Commented Jan 6, 2019 at 19:28
• Moving relative to what? Commented Jan 6, 2019 at 19:39
• You can only resolve the Twin Paradox by describing what happens when the travelling twin accelerates. (If there is no acceleration, then the "twins" will never be able to meet a second time to compare clocks.) So, instead of asking how the travelling clock knows it is moving; ask instead, how does it know that it is being accelerated? Commented Jan 6, 2019 at 20:53
• Clock B is being accelerated when leaving and decelerated when returning. Do they cancel each other out? Is anything canceled if point A is same as point B? Commented Jan 6, 2019 at 21:35
• "around the galaxy a couple of times at half the speed of light" Assuming you make a nice circle, like the Sun probably does, at 25.000 light years from the centre this will take a couple of times 300.000 years. You will need to replace the battery of your wrist watch quite a few times ... Commented Jan 7, 2019 at 0:31

If traveling inertially, the clock in the box doesn't know if it's moving.
That's the "Principle of Relativity"!

The following elaborates on Dale's answer.

Geometric analogies are useful.

• On a geometrical plane, a straight-line path from point A to B
(regardless of the direction from A to B)

has a length which is computed by chaining together a sequence of short straight-line segments from A to B.
(This means that the path from A to B doesn't have to be in any particular direction, like vertical or horizontal.)
• In spacetime, an inertial path from event A to B
(regardless of the inertial velocity from A to B as viewed in your frame) has an elapsed-wristwatch-time which is computed by chaining together a sequence of short inertial wristwatch-ticks from A to B.
(This means that the inertial path from A to B doesn't have to be in any particular velocity, like "at rest".)

For piecewise paths...

• Triangle inequality: Instead of going a along straight-line-path from A to C, you take (for simplicity) piecewise-straight-line-paths A to M, then M to B. From Euclidean geometry, it turns out that the straight-line-distances satisfy: $$dist(A,M)+dist(M,B) > dist(A,B).$$
"The straight-line path has the shortest distance."
So, the car from A to B will have less tire-wear than the car from A to M to B.

• Clock Effect: Instead of going along an inertial-path from A to B, you take (for simplicity) piecewise-inertial-paths A to M, then M to B. From special relativity, it turns out that the inertial-path-elapsed-times satisfy: $$t(A,M)+t(M,B) < t(A,B).$$
"The inertial path logs the longest elapsed-time."
So, the inertial-observer from A to B will have aged more than the non-inertial observer from A to M to B.

• Common-Sense Galilean-relativity: Instead of going along an inertial-path from A to B, you take (for simplicity) piecewise-inertial-paths A to M, then M to B. From Galilean relativity, it turns out that the inertial-path-elapsed-times satisfy: $$t(A,M)+t(M,B) = t(A,B).$$
"The elapsed time logged from A to B is independent of the path from A to B."
So, the inertial-observer from A to B will have aged as much as the non-inertial observer from A to M to B.

Admittedly, it's difficult to visualize the special relativity case because of the non-Euclidean geometry of Minkowski Spacetime. (It is underappreciated that the ordinary position-vs-time graph is also a non-Euclidean geometry... but we've learned to extract information from that diagram.)

To help in "visualizing proper time", here is a spacetime diagram on rotated graph paper.
The key feature in the construction is that the area of the "light-clock diamonds" (marking off the ticks of a wristwatch) are equal in magnitude along different inertial worldlines.
The traveller leaves at (3/5)c and returns at (3/5)c in order to meet up at the inertial-observer's 10-tick anniversary after separation.

When they reunite, the non-inertial traveler (although piecewise-inertial) is younger than the [always] inertial observer.

Although this diagram is drawn from the stay-at-home frame, the result is independent of the frame of reference.
And there is no Lorentz transformation that will ever straighten out A-M-B to be an inertial path. A ball sitting on a frictionless surface on the traveller's ship will move when the ship necessarily-turns at M. (The analogous situation is true in Galilean relativity.)
(Just like in ordinary geometry... the lengths and angles in a triangle are the same if the figure is rotated. And no rotation will unkink A-M-B to be a straight-line.)

check out my paper ("Relativity on Rotated Graph Paper", Am. J. Phys. 84, 344 (2016); http://dx.doi.org/10.1119/1.4943251 ; early draft: https://arxiv.org/abs/1111.7254 ).
See also my informal presentation at https://www.physicsforums.com/insights/relativity-rotated-graph-paper/ and my GeoGebra presentation at https://www.geogebra.org/m/HYD7hB9v#

I hear that the clocks will be out of sync when the boxed clock comes back on earth. Is that true?

Yes, this is a standard relativity scenario called the “twin’s paradox”. The traveling clock or twin returns younger. There are several ways that work to understand this. The best collection is this one:

$$\tau = \int d\tau$$
In units where c=1 in an inertial frame $$d\tau^2=dt^2-dx^2-dy^2-dz^2$$. Simply compute that for each clock and you get the amount of elapsed time.