It is said that 8051 has an on-chip oscillator but requires external clock to run it. What may be the internal circuit for on-chip oscillator, how it runs after connecting crystal oscillator? Also what is the purpose of external capacitor with crystal oscillator?
No.
There is no on-chip oscillator in standard 8051 architecture.
It is written in some books, I really don't know about it. Would you like to share about clocking of 8051 ?
Don't talk about "8051". Talk about a specific chip. Because specific chips from specific manufacturers will differ from each other.
Your current question is a bit like "how fast is a car?" or "is three wheels better than two?"