Start here. This is the direct spoken answer to practice first.
Why this question matters
Media types tell both sides how to interpret representation bytes. Treating every body as implicit JSON works until a client sends or requests something the endpoint does not actually support.
Content-Type describes the representation being sent in the current message, such as an application/json request body. Accept tells the server which response media types the client can handle. If the request media type is unsupported, the API can return 415. If it cannot produce an acceptable response representation, it can return 406 when strict negotiation is enabled. I keep the normal contract simple, usually JSON, and document the supported request and response types.