Which statistical test should I use for a relationship between a continuous IV and a binary outcome? What about confounders? I have a continuous independent variable ($x$) and binary dependent variable ($y$). I want to look at the relationship between them (I think I'd prefer regression to correlation) and I want to see how other variables (some continuous, some categorical) might confound the results?
Separately I also want to run another test looking at a continuous independent variable and ordinal dependent variable, also considering confounders. Which test do I use for this also?

In the comments, you remark that you would use a linear regression to model this for a continuous $y$ variable. This sounds like a reasonable idea, particularly since linear regression allows for nonlinear basis functions that introduce curvature (e.g., polynomials or splines) and interactions between variables.
Since you have a binary $y$, however, it is reasonable to model a slightly different way. A typical approach might be to use a generalized linear model like a logistic regression. A nice property of generalized linear models is that all of the tricks you can apply to the features in linear models also apply to generalized linear models. For the ordinal $y$, similar logic applies to a proportional odds ordinal logistic regression.
While you have commented that you seems to be more interested in correlation than regression, correlation is almost a special case of linear regression, so an extension to a regression framework seems acceptable.
