I don't think she knew what she was doing as such, I think none of them did to be fair, if they did, they'd never have went ahead.
She was expected to marry well, and breed babies, marrying the prince of wales probably seemed like a fairy tale to a young, titled, naive 19 year old in her position. I imagine she was more focused on the fact she would be rich, famous, married to the future king, her children would be princes or princesses, rather than if she actually wanted to be married to Charles as a person and what that meant.
She will have known The implications due to her sister, she would have told her, they were very close, but being headstrong, like many 19 year olds, they often know best.
No one would have known looking at that shy 19 year old, that she was actually a very opinionated, determined, manipulative, attention seeking woman, who would never just breed the heir and spare then settle down into a pampered royal wife, turning a blind eye to her husbands mistress and filling her time with charity work and pretty public appearances, as she was signed up for.
If she had, she'd still be here today, they'd still be married, those boys would still have a mum, Kate would have a mother in law and her own engagement ring, the grandkids would have a grandmother, and camilla would still be the mistress in the background, as was all the queen ever intended her to be.