I also see both in different examples.
As in :
Both are translated as "Today", but when and how should I use either one?
Can we say : 本日はあつい。 And 今日はおめでとうございます。?
本日 is keigo. You will hear this on a train or airplane, or in a store. But you won't be saying it yourself, unless if you as a beginning student are put in the unlikely position of making an official announcement to someone.
今日 is what you would use in ordinary situations.
Although 本日 will usually be too formal for most situations, there are many cases where you would use it over 今日 (with slightly different nuances).
Typically when referring to something tied to the day's date:
本日の魚 (in a restaurant)
本日の会議 (in a professional context)