How block explorer technology works? If you click on random wallet at block explorer you get an instant info of all the transactions, balance etc etc. My question is, how their technology works exactly? Do they transform blk????.dat files in some kind of database and then read the stuff from database? If they are, what technology they use to put all transactions in database? Is there any protocol I try to do as well with programme? 

When I open blk.dat files, I see only weird chars and from what I have read so far, the info there is not really transparent.
blk.dat files contain blocks data in raw format. Also a leveldb index is maintained that helps to quickly lookup blocks/utxo. You can find the details here and here.

Blockexplorers will not directly read these files. It is not safe for multiple process to access leveldb at the same time (blockexplorer and bitcoin node  process). Here is a brief summary of what a blockexplorer will do:


Create tables having indexes to store blocks/transactions/addresses
Do RPC calls/ listen to callbacks to bitcoind to get latest data 
Store fetched data into tables 
Goto 2. 


Most of the commonly used blockexplorers are forked from the below opensource  code:


insight
bitcoin abe