I think, such general question you will get answered much better in several books about materials sciences or Wikipedia than here at Researchgate in some sentences. Dislocations are also some kind of model in order to describe deviations from a perfect translation symmetry, or more practically, materials transport in crystals without disassembling the crystal structure.
Therefore, my suggestion is to read some general articles or chapters of book(s) in order to get a fundamental impression about the existing models. Please note, that these models are related to crystal lattices (another mathematical simplification) and not atoms so that the dislocation model matches perfectly to simple structures. If structures become a bit more complicates so-called partial dislocations ad antiphase boundaries need to be introduced in order to use the same mathematical concepts.
The question is too common to be properly answered. Please specify which is the mentioned mechanisms you are interested in, and then we will can discuss that.
Theoretically, a dislocation may be generated under a shear stress homogeneously, i.e. in a perfect crystal. Since a rupture of many interatomic bonds together is required for that, this mechanism is energetically unprofitable and then it may work only under highly concentrated stress. A probability of dislocation generation in a perfect bulk is low.
Usually, surfaces (external or intergranular, i.e. grain boundary) play a role of energetically convenient places for dislocations' generation, which may be started through dislocation/GB interaction under external load. In this case, existing GB not only stops moving dislocations and then caused material’s hardening (Hall-Petch law), but also contributes to increase dislocations' density in a crystal.
Another energetically convenient place for dislocation generation is cites of coherent precipitates’ nucleation. Since a surrounding matrix is already elastically deformed by nucleating new-phase precipitates, the acting stresses may achieve high concentration at precipitate/matrix interface, which may result in likely rupture of interatomic bonds and shear, i.e. dislocation’s generation.
In the case of existence coherent precipitates in metallic matrix, a dislocation moving under external loading can catch by a pair of them and then begin to bend. Since acting shear stress (coming from an external load) increases, a curvature of the "hooked" dislocation increases. At certain critical point, the curved dislocations comes off through generation of a "free" dislocation loop and less curved "hooked" new dislocation. Through the growing shear stress this new dislocation starts to bend, and then the process repeats. This is Frank-Read dislocation source. You can find the appropriate illustrations in literature.
Anyway, if you need this knowledge for you research, I recommend you to study the mentioned mechanisms in more details, including appropriate mathematical suggestions.