You should never use $$ in LaTeX. Well, there are rare situations in which $$...$$ can be useful, but they're very special.
Why do you get the error?
When TeX is typesetting a horizontal box, which is part of the work of \resizebox, display math mode is not allowed and therefore $$ just denotes an empty math formula. Hence, in your case, aligned is found outside of math mode, which is illegal and the error message tells you exactly this.
You should use $...$ instead. Well, assuming you really want to do that.
Is aligned necessary?
Not at all: you need aligned to make multiline displays, but you have just one (very long) line. The only thing aligned does is to add additional space between the second and third formulas.
\documentclass[twocolumn]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{lipsum} % for context
\begin{document}
\lipsum[1][1-3]
\begin{center}
\resizebox{0.999\columnwidth}{!}{%
$\begin{aligned}
\sin ^{2} \theta+\cos ^{2} \theta=1 & \quad
\sec ^{2} \theta-\tan ^{2} \theta=1 & \quad
\csc ^{2} \theta-\cot ^{2} \theta=1
\end{aligned}$%
}
\end{center}
\lipsum[1][4-6]
\end{document}
Why 0.999\columnwidth? Because the various roundings lead to a width of 229.50241pt, whereas the column width is just 229.5pt, so you get two lines. Here's the output:

Can you see the difference in the spaces? If you remove \begin{aligned} and &, you get

Why? Because aligned adds space after even numbered columns.
Why not doing a full display?
\documentclass[twocolumn]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{lipsum} % for context
\begin{document}
\lipsum[1][1-3]
\begin{gather}
\sin ^{2} \theta+\cos ^{2} \theta=1 \
\sec ^{2} \theta-\tan ^{2} \theta=1 \qquad
\csc ^{2} \theta-\cot ^{2} \theta=1
\end{gather}
\lipsum[1][4-6]
\end{document}

$$within a box. Displayed math expects that it is told how wide the space is it can fill, whereas the\...boxcommands expect that their contents has a fixed width. Moreover: Please post a small complete document that shows your problem, not just a snippet. – gernot Aug 04 '21 at 15:22$$with$solved it for me – timtam Aug 04 '21 at 15:24alignedif there is just one line? Why not dividing the display into three line and remove the\resizebox? – egreg Aug 04 '21 at 15:42