Plastic response of a solid under stress depends on its crystallographic structure and morphology. Two of the major mechanisms of plasticity in metals are crystallographic slip and twinning. The purpose of this work is to analyze the influence of local stress distribution on slip and twin nucleation and propagation and to examine how this behavior depends on the interaction among slips, twins, and grain boundaries. We formulate a simple model in which slip and twin systems are defined at appropriate angles to each other. Plastic flow is treated as a Markovian stochastic process consisting of a series of local inelastic transformations (LITs) in the representative volume elements (RVE). The probabilities of LITs per unit time are defined in the framework of transition-state theory. By varying the types of allowed LITs and/or the scale of RVE, plastic deformation is modeled at different structural levels, from a small volume of single crystal to the aggregate response of an isotropic polycrystalline solid. An important feature of this model is that evolution of the internal stress distribution is traced explicitly throughout the simulation run. This allows us to examine conditions of slip and twinning in considerable detail. In particular, we observe that twinning occurs through a nucleation-and-growth mechanism whose rate is controlled by the size of the critical nucleus of the new phase.