If you are behind the line of scrimmage it will just be recorded as a punt, and possession will change at the point it went out of bounds (although there may also be a penalty for ineligible downfield if you have receivers (other than the two men on the end of the line) beyond the line of scrimmage).
If you punted it after you had gone beyond the line of scrimmage, that would be a penalty.
It is also a penalty to deliberately kick a ball you are not in possession of (ie. a fumble).
Chat with our AI personalities