Internal forces are those forces which originate from the the system itself and are exerted by the system on its surroundings.These forces may also be exerted by components of the system on other componets present within the system.
For Ex consider a block of mass M present on the frictionless upper surface of a table. Here we are considering the block as our system.
Here the block is applying a force called normal force on the table. (Not to be confused by gravitational force being exerted on the block by the Earth) Since this force is being applied By the block on the table it would
be counted as an internal force(The force is being generated as the result of interaction of the atoms of the lower most surface of the block and the uppermost surface of the table.)
The electrostatic or gravitational attraction and repulsion within the block can also be considered as internal forces since these are being generated within the system(ie block)itself.
Now coming to external forces,these are those forces which are being applied On the system by surroundings.
Taking the same example:
In this case the forces are being applied by the block by the surrounding.
A vector represents the gravitational force which is being applied by the earth on the block whereas B vector represents the normal force which is being applied by the table on the block(Not by the block on the table as discussed in internal forces.)
If we consider the table and the block as our system both the normal reactions would now be considered as internal forces. However the gravitational force would still be considered as an external force since it is being applied by the earth which will act as a surrounding for our new system.
Hope this clear your doubts.