Warnings are a way to create a formal record of wrongdoing and serve as a way to keep track of long-standing or historic bad behavior. You can view the reasons and the dates for any warning given.
You can find the infraction ID by running the
!infractions command on the user you warned.
!warn @User <Reason>
!warn @User Spamming and trolling!