Is go see a competition. Better yet, if you're thinking of doing Pro/Am and your teacher has another competing student. Tag-along to a competition, and shadow that student. Ask questions. If your heart is still pattering over competing, then you're ready.
If you're doing an amateur/amateur or student/student competition. It's whenever you both are ready.
IMHO, doing your first competition is like jumping off the high diving board into the pool for the first time. It may be scary up there, it may be an ugly dive, but once you step off the board, you'll want to do it again and again. And hey eventually, you may want to try it head first, instead of always feet first.