Is there an intuitive explanation for what complex basebanding a signal is? I have an algorithm which takes an input signal, $x[t]$, and (among other things) complex basebands the data and outputs the phase of the complex numbers.
I'm new to the field and the Matlab function which produces the basebanded signal is a kind of black box to me. I've tried reading the code, but it's pretty impenetrable and not commented. I also tried to input different shapes of signals, but couldn't learn much from it. My questions are:

What exactly is the complex baseband of a signal? I sort of understand what &quot;baseband&quot; means, but where does the complex phase come from?

Related, does the phase have any relation to the signal? If I input a sinusoid, what should I expect the phase output to be?
What exactly is the complex baseband of a signal? I sort of understand what &quot;baseband&quot; means, but where does the complex phase come from?

A baseband signal is one where the center frequency is $\approx 0$ Hertz. There may be some small offset, but the idea is that it is no where near a passband signal whose center frequency is in the millions or billions of Hertz.
For a real signal, the frequency spectrum is symmetric. Due to the up-conversion process (converting baseband to passband so that the center frequency is no longer $0$ Hertz), we can put data on two orthogonal carriers, $\text{cos}$ and $\text{sin}$, in the passband signal:
\begin{align}
x(t)&amp;=\text{Re}\bigg(s(t)e^{j2\pi f_ct} \bigg) \\
&amp;= x_I(t)\text{cos}\big(2\pi f_ct\big) - x_Q(t)\text{sin}\big(2\pi f_ct \big)
\end{align}
where $s(t)=x_I(t) + jx_Q(t)$, is the complex baseband signal. For a nice explanation of what is probably happening in your MATLAB function on how to convert passband to baseband, check out this previous answer: https://dsp.stackexchange.com/a/43281/31316.

Related, does the phase have any relation to the signal? If I input a sinusoid, what should I expect the phase output to be?

There is a relation...it is the phase, that is all. The phase is helpful though and can help to pack more bits of information into a single symbol.