When the opponent plays other moves it turns either into a different opening or a different variant of the opening.
If you play d4 and the opponent plays Nf6 then the opponent is likely going to follow some form of Indian attack (King's Indian, Nimzo Indian, etc) or a Benoni.
If after d4 the opponent plays f5 he's going for a Dutch defense.
The theory for each opening is different so you can't use all of the opening theory from your Queen's Gambit. Like the poster above said you can still play c4 next for just about any response, but from then on the lines will head different ways.
Even in a Queen's Gambit you can have very different opening lines depending on your and your opponents approach. Accepted and Declined for starters.
I think a good way to explore new openings is to play a game and when you get to a position you haven't seen before/don't remember/etc. you play the best move you see and after the game you look into what is typically played there and why.
As a newcomer to the serious study of Chess, I am trying to practice openings, but there is something about them I don't understand. If a specific opening depends on your opponents moving their pieces to certain squares, but they don't, can you still use the opening?
As an example I'll use the Queen's Gambit. (1. d4 d5 2. c4)
Lets say black doesn't move its pawn as shown in the diagram. But instead, moves a knight out or something. Is it still a Queen's Gambit? Does white have to change their opening or strategy?
I'm practicing against the AI a lot, so maybe that's not a good way to practice openings perhaps? I would appreciate if someone could clear up this matter for me, thx.