Everyone who wants to know about how transaction replication works and how to improve the performance of transaction replication must read a great blog :
http://blogs.msdn.com/chrissk/archive/2009/05/25/transactional-replication-conversations.aspx
Summary:
log reader read the transactions(Changes) with sp_replcmds, for xp_replcmds.
then log reader writes into distributor database using sp_MSadd_replcmds
Distributor reads commands using sp_MSget_repl_commands
Distributor writes command to subscriber using sp_MSupd, sp_MSins, sp_MSdel stored procedures
Log reader and distributor keeps the history at distributor database with MSlogreader_history and MSdistribution_history tables.
This is very important information everyone should know.
Thanx.
Vinay