Hilary Duff definitely appears comfortable in her own skin on the cover of Cosmopolitan, and now she is revealing why she wrote her hit single, All About You.

Hilary Duff Opens Up About Divorcing Mike Comrie, 'I Just Always Want To Fight For Happiness'

On Tuesday, Cosmopolitan shared a part of Duff's interview from the April issue of the magazine of which she is on the cover.

Duff definitely opened up during the interview on some tough subjects, but she also revealed why she decided to write her song that's all about self-love and having fun.

Hilary Duff Appears On Cosmopolitan's Cover In Short Shorts & Killer Cheekbones

She revealed that the song was more than just a fun beat for her.

"I wrote that song for a reason! I've enjoyed myself. I think everyone should have something where you know it's not exactly what you're looking for but you just have a wicked good time. That was really freeing for me and a bit of an awakening. It's fun to have a secret."

The singer also answered some questions about her marriage and divorce from Mike Comrie.

"Mike and I were very in love when we met. We both really wanted to get married. I'd been working since the age of 11 or 12, so making that choice at a young age seemed right for me. Maybe it wasn't, but we spent the majority of our time together really happy. It wasn't working well enough to stay together, but there was still a lot of love involved. It was just a slow set-in of us not being the match that we used to be. I'm lucky for the person he is and I am, and how we decided to handle this."

Finally, she shared her thoughts on marriage now that she is going through a divorce with a two-year-old in the mix.

"I don't want to sound bitter because I'm definitely not, but I don't know if people are meant to be together forever. Things happen over a long relationship that you can't always fight. A marriage of 20 years, the accomplishment of that must feel really great, but there are also huge sacrifices. I just always want to fight for happiness."