I just got a raspberry Pi, and I am more familiar with software than hardware. Can I plug my ribbon cable into the GPIO pins if my Pi is on?
The simple answer is it depends, partly on what is connected at the other end.
Strictly you should NOT, as you cannot guarantee what order connections would be made. (USB etc devices designed for hot plugging have mechanisms to ensure Ground and Power are connected before data.)
In practice it is unlikely to cause any damage, unless there is a possibility of connecting +5V to GPIO pins.
As your questions stands, yes you can plug a ribbon cable into the Pi.
This is the same as manually connecting each GPIO pin to a single piece of wire.
What are you plugging it into?
As with any hardware on the GPIO I would recommend only plugging/unplugging when the power is Pi is off and the power disconnected.
I just tried hotplugging the Adafruit 128x64 OLED Bonnet into a Raspberry Pi 4B, and the Pi locked up hard (had to be power cycled).
Edit: I have no idea why this answer is being downvoted. I put this to the test to answer the question (at the risk of destroying my hardware, I later found out in the comments) -- and the answer was clearly no, hotplugging doesn't work.