It depends on the species and ID of the Pokemon you are breeding.
The process is different and more complicated in G/S/C than in other games, so pay attention for this next part.
In G/S/C, after you give both Pokemon to the daycare man, there exists a pre-calculated number based on how compatible the Pokemon are with each-other, we'll call this number "A". After this pre-calculated number is determined, another number between 1 and 255 is is randomly decided, we'll call this number "B". For every step you take, "B" is subtracted by one until it hits zero. Once "B" hits zero, another random number between 1 and 255 is generated, and we'll call this number "C".
If "C" is lower than "A", then you will get an egg.
If "C" is higher than "A", then you will not get an egg. If you do not get an egg, then this process repeats until you do.
The (estimated) pre-calculated numbers (or "A") goes as follows:
If the Pokemon you're breeding are the same species but have different IDs, the number is 127.
If the Pokemon you're breeding are the same species and have the same ID, the number is 96.
If the Pokemon you're breeding are different species and have a different ID, the number is 63.
If the Pokemon you're breeding are different species but have the same ID, the number is 32.
Basically, you have a higher chance of getting an egg if the Pokemon you're breeding are the same species and have different IDs.
Good luck, my fellow Pokemon Breeder!
Source 1
Source 2