What is the work done by the bitcoin core client during the initialization process? Is the block index created locally or downloaded at other partner nodes?
The raw block data is downloaded, and nothing else. All block and transaction indexes are created locally. In the process, block hashes are checked and transactions are verified (to various degrees) as to whether they spend valid inputs, are properly signed, and so on.
Each block is checked and added to the index immediately after being downloaded. The software doesn't wait to download all the blocks before starting to index them.
The files in
blocks/index contain information to help locate blocks. For instance, it would contain an entry for each block with its hash, other relevant header data, the number of the
blk*.dat file where it is stored, and the position within that file. If
txindex is enabled, these files also contain one entry per transaction, pointing to the location of the block which contains the transaction, and the position of the transaction within that block.
The index of unspent transaction outputs is found in the
The best resource to learn about these indexes is to read the Bitcoin Core source code. There is an older writeup at https://en.bitcoin.it/wiki/Bitcoin_Core_0.11_(ch_2):_Data_Storage, but as of 0.15.0 at least the chainstate index has changed significantly (thanks Pieter Wuille). It is also explained at What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?.