There are a couple of different versions of the CP model. You are looking at the earliest, simplest, two-parameter model proposed by Monod and Scherrer in 1965. While there have been modifications and expansions of the original model since then, the basic simple model has enough features that you can understand it. Although CP has been described as "the power that could be sustained indefinitely," in practice it works fairly well from durations of perhaps 3 minutes out to around half an hour -- additional parameters have been proposed to address durations before and after that.
If you have been riding with a power meter for a while you've undoubtedly seen a curve as you described, showing maximal average power in watts over durations in time. The simplest way to understand the Monod-Scherrer model is to notice that a watt is a Joule per second. So, to get Joules of work, multiply the power in watts by a duration in seconds. Monod and Scherrer noticed that if you plot Joules on the y-axis and time in seconds on the x-axis, the relationship is nearly linear for durations from around 3 minutes out to around half an hour. A linear relationship like that can be approximated by a line with an intercept and a slope. The slope is what they called CP, and the intercept is what we now call W'.
If Joules(t) = W' + cp*t, then an equivalent formulation is the one you've already seen. Since a watt is just a Joule per second, just divide the equation by time on both sides to get watts(t) = W'/t + cp. In this formulation, if you plot watts against time, CP will be the asymptote and W' will be a constant that determines a hyperbola. You can see why some people prefer the intercept and slope formulation rather than the asymptote and hyperbola formulation.
Note that because W' is the y-intercept, it describes an amount of energy in Joules; because CP is a slope in the regression of Joules on seconds, it describes power in watts. Thus, if CP were 200 watts and W' were 15000 Joules (= 15 kilojoules), then a prediction for the amount of work you could do in 600 seconds (= 10 minutes) would be 15000 + 200 * 600 = 13500 Joules over 600 seconds, or an average of 13500/600 = 225 watts. You can think of W' as a "stock" of energy (like a storage battery) that you can expend in addition to the steady state power you can sustainably produce (that is, CP). You can expend that W' quickly or slowly but once the battery is run down you have to recharge it. In this example, you were expending it over 600 seconds, so another way to think of it is this: if your CP were 200 watts and you have 15000 Joules of stored energy, your baseline is 200 watts and you can add to that 15000/600 = 25 watts for a total of 225. If you expended it over 300 seconds (= 5 minutes) your baseline is still 200 but you can add to that 15000/300 = 50 watts, so your predicted maximum power for 5 minutes would be 250 watts. This alternative way of calculating predicted maximum power is Watts(t) = W'/t + cp.
In either formulation, if you have values for W' and CP, you can calculate the estimated power for any duration from around 30 seconds up to around an hour. (If you use the Joules formulation, you just have to divide by the duration to get watts). That's how the CP curves that you've seen are calculated: using values for W' and CP, you can create a curve and plot it showing predicted power at any duration. Note that with only two parameters, the model implies a power duration curve that has an asymptote not only at CP, but also one with the y-axis at zero duration. This is why models with more parameters have been developed -- to deal with the asymptote at zero and the asymptote at long durations.
From a practical perspective, typically your curve of time to exhaustion will not be "smooth" if you base it on just a single ride -- usually, you combine the maximal durations for several rides over a few days or weeks. Also, to get reliable estimates of W' and CP you'll want to make sure you've put out maximal efforts. A typical procedure may be to do maximal efforts at, say, 3 minutes, somewhere in the range of 5 to 8 minutes, and perhaps somewhere in the range of 15 to 20 minutes. That will give you 3 data points. You want these efforts to be maximal for the targeted duration, and typically that means you want them to be relatively steady -- there will always be some variability in your efforts but you don't want the efforts to be repeated sprints of 30 seconds followed by 30 seconds of recovery. Aim for the maximal output you can sustain. I don't recommend that you do these 3 efforts in one ride or even over 3 consecutive days -- space them out over a few days.
That procedure will give you 3 data points of maximal power and durations. Convert to Joules, and calculate the regression slope and intercept. A side effect of this is that you will have the usual regression diagnostics, with standard errors for the slope and intercept and an R^2 so you can evaluate goodness-of-fit. If you do more tests, you can use more than 3 data points for your regression.