It means to reprimand harshly, often publicly, for wrongdoing.
Here are some examples of how it's used:
* The judge castigated the defendant for his reckless actions.
* The teacher castigated the student for plagiarizing their essay.
* The author was castigated by critics for their insensitive portrayal of minorities.
So, while "castigate" itself isn't a type of speech, it describes the act of criticizing someone severely.