If you plant a town right on top of a bonus tile, does it delete the gain from the bonus?
Every city center gets two food (three if Agri), regardless of terrain. So, if you settle on a cow, you lose the food bonus. OTOH, if you settle in tundra or on hills you gain food.
Every center of a town (size 1-6) that is on terrain without a shield bonus (grassland, tundra, floodplain) gets one shield free. However if the city is on terrain that has shields, there is no such gift. Instead, the city center makes as many shields as the terrain gives.
And commerce? You always get commerce that the tile gives.
All in all, avoid settling on food bonuses. In the case of other bonuses, it is ok if you settle on them, probably even advisable because it saves you the hassle of improving the tile.
For example, if I plant my town right on a cow, does it eliminate the benefit from the cow?
A city center on a grassland cow would look as follows:
1-6: 2 food, 1 shield, X commerce
7-12: 2 food, 2 shields, X+1 commerce
A city center on a plains cow would look as follows:
1-6: 2 food, 2 shields, X commerce
7-13: 2 food, 3 shields, X+1 commerce
In comparison, a city center of a tundra/grassland/floodplains tile looks as follows:
1-6: 2 food, 1 shields, X commerce
7-13: 2 food, 1 shield, X+1 commerce
Also, just wondering what exactly is "included" in a town. Does it count as roads automatically?
It counts as roaded. It counts as railroaded if you have Steam Power, even if you lack Iron/Coal.
What about irrigation and/or mining?
No.
If I place a town on hills does that mean I can't mine them?
Yes. Any preexisting mines are destroyed. (Although, if you settle a tile that is currently being mined, the worker will continue his, now pointless, task ... )
When you reach Steam power, do all cities get an extra shield since they now contain railroads?
No, because rails enhance the output of mines and irrigations. And since your city center does not count as either mined or irrigated there is no benefit.