Say my opponent puts me in check. If I move my queen to block the check and it also puts my opponent in check, is that legal?
It is legal to block a check with a move that also gives check. This includes the case you ask about, where the blocker is a queen; this is a key tactic in queen endings.
In general, a move that simultaneously parries a check and gives check is called a cross-check. This can happen with any of the three ways to parry a check:
The King can move, discovering check;
the checking piece can be captured, giving either direct or discovered check; or
the check can be blocked, again with either direct or discovered check.
Tim Krabbé cites two tournament games (Zarrouati-Brauckmann, Toulouse 1990; Cardona-Conejero, Mislata (Spain) 2003) each featuring a sequence of six(!) conecutive checks, and thus five consecutive cross-checks. These show four of the five kinds of cross-check listed above (including one where a Queen move both blocks and gives check, as John asked). The fifth kind, a block that discovers check, is illustrated twice in G.F.Anderson's 1919 problem cited on Wikipedia's "cross-check" page, and five times in the 1961 problem by the same G.F.Anderson — including three cases where the cross-check is both direct and discovered, i.e. a double check.
It is absolutly legal. A fun lichess study even did it some times: https://lichess.org/study/1LK3rCAK (it happened 5 times if I counted correctly, but not a lot with the queen :) )
It is indeed, allowed for you to do that. Because, your king is not being attacked and according to the chess rules, if your king is not being attacked, you are allowed to do anything to stop the check. When you put your queen in front of your king to block checks, you are basically defending your king. Thus, according to the rrules, it is allowed and I think it is encouraged because you are protentually putting your enemy's king in danger while protecting your king at the same time.
It is legal to block the check in a way which puts the opponent in check.
The rule is easier to understand with some history. One can think of chess as a game which ends when one captures the enemy king. Indeed, there are some variants of Chess which do end this way. However, historically it was highly frowned upon to think about capturing a king. Capturing a queen was bad enough, but kings were not something a peasant just went around capturing. And so, the game of Chess evolved to not capture the enemy king. Instead, we reach the point where capture of the enemy's king is imminent inevitable, and then stop.
If you block the check with another check, then the capture of your king was not inevitable. You had a way out.
Think of it like a nature documentary, which cuts away from the wolf chasing the cute baby deer right at the moment where the baby deer's capture is inevitable. Everybody knows what happened, but we don't like to show it.