Program counter in a CPU I know that the CPU has a program counter which takes instructions that are required to execute a program, from the memory, one by one. I also know that once the first instruction is executed, the program counter automatically increments by 1 and accesses the data in the cell with the corresponding address.

Now my question is, what if the next instruction in the memory cell, i.e. the instruction in the memory cell after incrementing the counter by 1 is not the required instruction to execute the given program? And what if the next instruction that is required is, in a memory cell who's address can be got to only after 'n' increments?

If it helps I used this video as a reference

EDIT: If it isn't clear, what I'm trying to ask is this:
Suppose to execute a given program I need 5 instructions- A,B,C,D,E.

Now suppose instruction A is loaded in a  memory cell with address 0000H. So when the program counter reads 0000, it takes the instruction from 0000H, and when the counter reads 0001, it takes the memory from 0001H and so on. Now what if instruction C is in 0007? After 0001H the program counter would increment to 0002. But i don't need the instruction from 0002H. I need it from 0007. So what does the counter do in such a situation?
Code isn't arranged randomly in memory. The next instruction to be executed will, by default, be the one at the next memory location, unless something specific (a "jump" instruction) is done to execute code from somewhere else.

So, if your program is literally "Do A, then B, then C, then D, then E", the compiler will place those instructions in consecutive memory cells. If, for some reason, they were in non-consecutive memory cells, the program would have to become something like "Do A, then jump to B's location, then do B, then jump to C's location, etc." The computer has no way of knowing that it's not supposed to execute the next instruction in memory, except being told to do that. And being told to do that requires the execution of some kind of instruction.