What is meant by coordinate time? Isn't it time measured on a clock? If not then what does it measure?

In relativity we deal with spacetime which is a 4-dimensional structure called a (pseudo-Riemannian) manifold. It includes space and time together. Meaning that time is just another direction in spacetime, perpendicular to the three dimensions of space.

In the manifold we have a metric which describes all of the geometric properties of spacetime. It describes physically measured distances and durations and angles and speeds. You can use it to identify straight or curved lines and so forth. Straight lines in this sense are technically called geodesics.

A point particle forms a line in the spacetime manifold, called its worldline. An extended object forms a worldsheet or a worldtube, but we will stick with worldlines for now. A physically measured duration is called proper time, $d\tau$, and is measured by a physical clock on a specified worldline. An inertial object (in free-fall, no real forces acting on it) moves in a straight line at constant speed according to Newton’s first law. In other words, an inertial object’s worldline is straight.

Now, spacetime does not come with any physical labels or grid lines on it, but often we find it convenient to add labels/gridlines. These are called coordinates. Coordinates are ordered set of four numbers that label each event in spacetime. They must have some nice mathematical properties like being smooth and invertible. Everything else is a matter of convenience.

One approach that is often convenient is to use the first coordinate for time and the last three coordinates for space $(t,x,y,z)$. A further convenience is to use straight lines and planes. A further convenience is to choose an inertial object as a reference and orient those lines so that the time coordinate axis is parallel with the reference object’s worldline and so that the space axes remain fixed and don’t rotate. A final convenience is to scale the coordinates so that on the reference object’s worldline the physically measured proper time matches the coordinate time and so that coordinate distances match measured physical distances. Such coordinates are called the inertial reference object’s rest frame. In the absence of gravity such coordinates can extend to cover all of spacetime, but with gravity they can only be local, near the path of the inertial object.

Importantly, in these coordinates the metric can be written as $ds^2 = -c^2 d\tau^2 = -c^2 dt^2 + dx^2 + dy^2 + dz^2$. The physical time measured on any clock can be obtained by integrating the above expression for $d\tau$ along the worldline of that clock. The coordinate time is merely a convention for assigning the labels as described above. This convention is chosen to match the physical time on the reference object’s clock, but not necessarily on other clocks. Elsewhere, $dt$ is merely a label.

In special relativity one traditionally imagines that spacetime is filled with a network of clocks that are Einstein synchronized. The clocks define an inertial reference frame, and the time coordinate of an event is the reading on the nearest clock.

When dealing with curved spacetime you usually can't Einstein synchronize clocks, and it's usually not convenient to use clock readings (however synchronized) directly as a coordinate, so coordinates are treated more abstractly. The same is true when dealing with ordinary curved surfaces like the surface of the Earth. We use latitude and longitude to measure global position, but there are no rulers that measure latitude and longitude; measurements are done locally with metersticks. In general relativity, the metric tells you how to convert between local measurements of clocks and metersticks and the global coordinates that you're using.

Mathematically Space-Time is a 4-dimensional Lorentzian manifold $L$. Coordinates of an event, i.e. $(x_{\mu})=(ct, x, y, z)$ only make sense when you define an Atlas $\mathcal{A}={(\mathcal{U}_{\alpha}, \phi_{\alpha})}$ on $L$ where $\mathcal{U}_{\alpha}\subset L$ and $\phi_{\alpha}:L\rightarrow\mathbb{R}^4$ is a homeomorphism (i.e. continus functions between the topological Spaces $M$ and $\mathbb{R}^4$). The coordinates of a point $p\in U_{\alpha}\subset L$ are then given by $\phi_{\alpha}(p)=(x_1, x_2, x_3, x_4)$.

There are a few restrictions on the $\phi_{\alpha}$ in order for the math to make sense, but other than that you're more or less free to choose any parametrization you want. The main idea is now, that physical quantities and laws should in a sense be independent of this choice. $\tau$ is such a quantity, the coordinates $x_i=\phi_{\alpha}(p)_i$ are obviously not.