Since Charles has not yet succeeded to the throne, he cannot abdicate it. Abdication is when a crowned king steps down, like the Duke of Windsor did.
Charles wouldn't have been automatically excluded from the succession if he had originally married Camilla when they first fell in love in the 70s. It was just that times were different then, expectations of the people princes married were different, too, and Camilla wasn't seen as fitting the "ideal" for the wife of a king (she was a bit wild).
Charles dithered too long rather than saying this is it, this is the girl I'm going to marry - he didn't feel that he could marry before he did his military service, and there were strong objections to Camilla - and Camilla married someone else.
He married Diana because Camilla was already married, he was being told that it was past time for him to marry and start a family, and Diana was an easily-approved choice.
Under the Royal Marriages Act, members of the royal family have to obtain the monarch's permission to marry, and their spouses have to be approved. It wasn't a question of losing his right to the throne. It was a question of gaining the queen's consent to the marriage, which wasn't going to happen because Camilla wasn't seen by the queen as a good match for the heir to the throne.