Custom Block

I'm building an add-on that has a custom controller. I want to be able to use blocks as part of the layout for those pages but I also want to create a new type of dynamic block for use on those pages (although it could be used anywhere) But I can't find any documentation on how to do that?