Avoid foolish and unlearned questions: Foolish questions must be avoided, because their subject matter deals with foolish things, i.e., with things contrary to wisdom, namely, with matters contrary to divine wisdom. A man should not raise such questions, but resist them: every man is become a fool for knowledge (Jer 10:14).
But he says, unlearned questions, because of the manner in which they are proposed, namely, by shouting. Or, unlearned, on the part of the matters under doubt; for example, if someone calls into doubt some article which the entire Church holds: but Job has spoken foolishly... and his words sound not discipline (Job 34:35).
But questions should be loved to the extent that they lead one to the truth, for all should believe one and the same thing. But foolish questions lead not to the truth but to strife, which must be avoided: behold, you fast for debates and strife, and strike with the fist wickedly (Isa 58:4).
Source: Commentary on 2 Timothy