I'm a submissive and babygirl in a 24/7 D/s relationship with my Daddy Dom who's also a sadist and a voyeur. Thankfully, I'm a masochist and a (sort of) exhibitionist. I'm also a writer, podcaster, and blogger who loves talking about kink, D/s, and sex. Even though we're both open to all sorts of kinky fun, we always make friends with people first.
A contract can be as formal as you like - SubmissiveGuide.com has a few great examples on their site if you want it to be written. Contracts aren't a requirement, but if you are going to use one, I've found they're good at the beginning of a relationship or when you're making a transition to Read more… something new (new dynamic, new rules, etc.).
For ideas of what to include in it, I'd suggest:
What rules, tasks, rituals will be in place . What the consequences will be for a broken rule or bad behavior (assuming you have some discipline aspect to your relationship). What the Dominant will and won't do. What the submissive will and won't do. Any special protocols - titles to be used, ways to address each other, when and how you'll communicate with each other (open communication is best in my opinion but in high protocol dynamics, a formal method may work best). Hard and soft limits could also be included. Whatever you put in it, know that you can and should be able to renegotiate any aspect of it. You may want to include when you'll formally review the contract (every month? every few months? as needed?).
I don't think every D/s relationship needs or has to have a contract but they can be really helpful for making sure you both know exactly what you're agreeing to, what you want, what you don't want, and what the rules and expectations are for both of you.