Is heating oil identical to fuel oil?
Home heating oil and motor diesel are very similar in terms of density and chain length (basically same stuff) with minor differences in sulfur content (at different eras in different countries) and with colorant for tax purposes.  [Similar to comment above.]  

In general the middle distillates would have a bit more sulfur in them if just based on distillation cut.  In order to meet lower sulfur requirements for diesel, additional processing is needed in the refinery to get the sulfur out.  As the US (and other countries) started putting in stricter and stricter sulfur requirements for diesel (for pollution reasons), it has had the impact of driving diesel prices up to be more than gasoline--traditionally it was cheaper.

[Note also that, at least in the US, it is possible to buy untaxed, undyed diesel for use in farm machinery.]

Note that "RFO" or residual fuel oil is a very different beast from home heating oil.  It is much heavier and higher boiling point fraction in the column.  It also typically has MUCH more sulfur in it (from concentration, the sulfur containing compounds tend to be heavier).  RFO is used in large onshore power plants (declining in the US but still some remain and many overseas) and also in ship power plants ("bunker fuel").  Ship use is both in steam boilers and in "marine diesels".  Larger shipboard diesels have evolved to become larger and larger, competing with steam turbines, and they are designed specially so that they can use a more crappy fuel (don't need motor diesel). RFO is also often burned (for heat exchangers and/or cogen) in island refineries (that lack access to natural gas).

Note that shipboard use of RFO is expected to decline after 2020 because of new restrictions on open ocean fuels (the "IMO law").  RFO burning is already prohibited in close proximity to North American and European coastal waters. The issue is sulfur content.  Ships can continue to burn the RFO if they install onboard sulfur scrubbers, but current indications are most will just use a lower sulfur fuel.  The easiest way to do this is to use something close to a motor diesel (rather than desulfurize RFO itself).  Will have a little more sulfur than most land diesels, but still somewhat desulfurized...and just because it is a middle distillate "cut" inherently has much less sulfur than RFO (which collects the nasties when distilling).  Also there are still questions about enforcement (i.e. cheating) or even legality of regulating open ocean operations.  But overall impact will be a big drop in prices for RFO as market goes away and more pressure on middle distillate prices.  [Ships can also shift to LNG but this is even trickier than scrubbers because, in addition to engine modifications, the infrastructure to bunker LNG does not exist in most ports.  But perhaps over time, we will see migration to LNG, a zero sulfur fuel.] 

A decent reference is here:  https://www.amazon.com/Petroleum-Refining-Nontechnical-Language-William/dp/1593701586 It is a few years old so won't have the IMO discussion but will give you a good overview on the whole situation and is VERY friendly in terms of plain language.  I bought it before going into the industry and worked through the whole book in a few days...totally helps with some initial grounding in things.  After that you can fill in the blanks with whatever you are doing (marketing, buying, refining) by just asking for specs.

See also: https://www.eia.gov/tools/glossary/index.php?id=petroleum EIA glossary--you may also find some other info if you scratch around that website...a lot of pages and FAQs are a little buried.