That depends on encryption you are using. In any case OS creates
partitions and formats it (or specialized software). Next if you
have software encryption, than special driver is installed which
either encrypted files or whole disk by intercepting read and write
operations called by OS. If you have hardware encryption, then your
whole hard drive is encrypted on hardware level. It means that
hardware has extra steps before writing or reading information on
hard drive.