I am new to ADF applications and I have a requirement to customize ADF query. But I'm not sure how to customize ADF Query and also can you explian detail how ADF Query works internally
What customization? Are you trying to grab the query event and replace/extend/override it? For more in-depth on how the internals of ADF works, take a look at this book.