Example: You have d major scale but you make a c flat accidental, does it just naturalize c back to its basic form or make it an enharmonic b? Ive tried searching on google but found nothing. It's like flats and sharps raise and lower notes by a 1/2 step so technically c-flat in the d major scale should be c-natural right? Or do accidentals take the most basic form of the note and then alter it?
The answers so far seem to have missed the point. I think you're asking in a key where there is C♯ in the key sig., and you come across a C note with a flat sign just before it, what do you play.
You'd play a C♭ note - equivalent on most instruments to sounding like a B. Reason being, any accidental changes a base note into sharp or flat, and a natural sign means it gets played as a standard note - one of the white keys on the piano, if you like. A double sharp or double flat changes the note it's before into a note a tone higher or lower, respectively.
Put another way, the key sig. changes particular notes whereas an accidental treats the note as a natural that needs changing in the shown way.
Having said all that, I cannot think of a single reason why a C♭ note would need to be written in key D..!
If you are reading a modern edition of the music, a C with a flat in front of it always means C flat, which is the same pitch as B natural.
However in music scores written in the 18th century this is not always the case. For example in the attached violin part (by Vivaldi) published in 1711, it is obvious from the context (as well as from reading contemporary books on music theory and notation!) that the "F flat" really means F natural.
Later on in the same piece there are also some "C flats" that are clearly C naturals.
Note that the rules for how long an accidental stayed force were also different at that time. For example the two F's in the following bar would also be F naturals.
This notation was still in use beyond the death of J S Bach - and was been responsible for a few mistakes in interpretation that survived for 100 or 150 years, when old manuscripts were discovered and republished by people who didn't know about the old notation system.
I assume standard convention here as opposed to repeating any accidental to each note, where it applies.
A natural sign neutralizes a previous accidental (whether part of key signature or individual), so c# naturalized returns to c, b flat naturalized returns to b.
A repeated sharp to an already sharped note does not accumulate, you still have a simple sharp. (Same for flat). In clean notation there is no alternative to naturalizing before applying the other accidental.
Should you desire a double sharp/flat, this has be indicated by a double sharp/flat symbol. Most probably a simple sharp/flat to the same note came before.
A natural sign is also sufficient after a double sharp/flat to arrive back at the base note.