The easiest way to find out the algorithm for each model is to look at the Engineering Reference which is available in two places:
http://nrel.github.io/EnergyPlus/
https://energyplus.net/documentation
If you want to look at the specific source code, you can do that also. It is written in C++ and is available at:
https://github.com/NREL/EnergyPlus
For the boilers, I would start with the following C++ files:
https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/Boilers.cc
https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/BoilerSteam.cc
It is much easier to use the existing objects that are already in EnergyPlus than to create new ones but if none of the existing models matches the piece of equipment or building component or type of system that you are looking to model, you can either add or modify the source code. The instructions are here:
https://github.com/NREL/EnergyPlus
Since EnergyPlus is open source code you can modify for your own use. If you want to ultimately contribute the code back to the project so that anyone can use your model, I would suggest that you contact the development team by using the help desk so that we can guide you through the process. The helpdesk can be reached here:
http://energyplus.helpserve.com/