Some mining pool admins put custom data in block headers, like prayers. How do they do that? Where can I see that data for myself?
When you generate a block, the generation transaction (the one that creates new coins) has an attribute called coinbase. It's a special value you can put anything you want in to make the block unpredictable to others (and this is good).
So, naturally, you can put text in this attribute, although most just put mining-related information that is not human-readable (nonce and extra-nonce).
You can read this coinbase by using a patched bitcoin node that can dump blocks, for example with the "dumpblock" or "getblockbyhash" patches.
Or you can just print every string in the blockchain database directly :
strings -n 20 blk0001.dat
Example for the 1st block:
ᝣᝣᝣᝣᝣᝣᝣEThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks
This is what is used by the Eligius pool ; it puts prayers in this field.
Dan Kaminsky explained his method and motivations for inserting images into the blockchain at a talk at Black Hat USA 2011 - the relevant slides (12 -20) from the presentation can be found here.
His basic method was to create transactions with lots of outputs and to include the message in ASCII, in pieces, in the receiving address field of the output scripts. You can see the corresponding hex codes for the ASCII in his message in the raw transaction. You can see that the message is interrupted by the other transaction fields, so you can only see the messages properly if you look with a tool (such as strings) that filters out non-printable characters and displays printable characters in lines. His transaction required a .15 bitcoin fee, about $1.50 at the time.
There was a very interesting talk at Chaos Communication Camp this year on this topic. IIRC, you can store arbitrary information in bitcoin transactions, since they actually contain "programs" specifying how the transaction should be verified.
Information on the 'scripting' interface can be found here. See section 2.3 for details on imbedding messages.
This is right now just a technological curiosity, it has no known implication on the legal or technical aspects of Bitcoin. I haven't read his paper, but he must have used a modified miner that searches for hashes that begin with a preset prefix.
Let's clarify: Mining is the process of finding solutions (or hashes) to a cryptography equation. The first to find a solution gets to have his solution added to the blockchain - the permanent transaction record. What Kaminsky did was look for a particular kind of hash instead of just any random hash, that contains the embedded test. Once this was found (just a matter of running a miner for a long enough period), this specific solution, with the embedded text, was added to the blockchain.