You have a couple good questions here.
Parallel Fifths and Parallel Octaves occur primarily in realizing functional harmony; whether it is in a chorale, a fugue, or any number of traditional forms of the European Classical tradition.
They are the result of two voices moving in parallel motion - hence the term "parallel fifth / octave." They are forbidden in counterpoint because they weaken the integrity of the independence of the voices. This is one of the reasons why Debussy's parallelism caused such a stir when he began using it consistently.
The rules change a little bit when a large ensemble comes into play. Composers will double melodies at the unison or octave to provide different timbres - the texture of the sound. To answer your question, if you have a melody doubled over itself at the octave, it is both doubled and in parallel motion, so it's both.
Why is that not wrong?
Because the context of the rules have changed.
Typically with a large ensemble, a composer will maintain the SATB (soprano, alto, tenor, bass "voice") integrity of the overall musical texture. Large ensembles are divided into three, sometimes four choirs: the woodwind choir, the brass choir, the string choir, and the percussion choir. Within each of these choirs composers distribute the voices according to the sound that they want to achieve. To this end, they usually end up "doubling" music that they've already written with several types of instruments.
This is why the trumpets for example can play the same line as the flutes and they're technically not breaking any rules.
"Consecutive octaves" are just another name for "parallel octaves", so no worries there.
It is important to note that I am speaking very generally about this with respect to large ensembles and a specific time period. There are exceptions to every circumstance.