Creating scrolling text boxes

How do I create one of those scrolling text boxes that I can drop some sample code into when I make a post. I see them getting automatically created in my entries but I don’t see how to intentionally create them or control the size or when parts end up inside them.