That's a challenging question, I think. To me, the easier term to define is "modernism."
Modernism is a period in philosophy, literature, and the arts (including architecture) that generally stretches from around 1895 (or 1900 or 1910, if you prefer) to around 1945. It's a period marked by strong interest in the emerging scientific understanding of the inner world of the mind and by strong commitment to bridging any number of gulfs that were perceived to have emerged through industrialization and mechanization. The Bauhaus movement in Germany, for example, sought to unify the enormous division between the handicrafts of the artisan and the products of the assembly line. Similarly, perhaps, T.S. Eliot, James Joyce, and that crowd -- in their poetry and other words -- sought to find meaningful connections (in part through what Eliot calls the "mythic method") between the valued classics of the Greek and Roman eras and the seemingly blind machinery of their own "modern" age.
Modernity is a much more general term, to me at least, and seems not to have an even loosely defined sets of dates. Modernity is now. I've mostly heard the term used in philosophical discussions that seek to explain or diagnose current states of affairs.
The link below gives some excepts from published defintions and discussions of these terms. I think that locating and reviewing a few key definitions would help you move toward the answer that you want.
I agree-- I'll add that besides the particular interests jk180 identified for modernist artists and writers, modernism is characterized by a commitment to stretching the potentialities of form (language, image, etc.). Thus in modernism you'll find experimental styles and techniques like stream-of-consciousness, free verse, montage, etc.
While modernism describes cultural production, modernity is a term for a historical period. The reason I think the terms feel so hard to define is that modernity is demarcated by a series of technological advances that deeply influence and determined the concerns of modernism. (This as opposed to more rigidly demarcated periods, such as the Victorian Age, which coincides with the reign of Queen Victoria of England; note that the Victorian Age is coincident with modernity.) Modernity is the period after the medieval period for some, since that's the technical transition from agrarian production to a more urban-centered, market economy. Some think of modernity as beginning with the advent of (mechanical) industry, the Industrial Revolution (1830s). The end date is likewise indefinite, but it is important to note that we are no longer in "modernity," according to the perspective I personally adhere to; we're in "postmodernity." Generally the transition from modernity to postmodernity is located in the shift from national markets to global capital, and is also associated with a sense that the modernist (Enlightenment) faith in reason and progress has not delivered.
Another thought: modernity is often quite different in its commitments from modernist artistic production; especially in the case of the avant-garde, modernism is often a direct rejection of modernity. Not always. For instance, the modernist movement Surrealism rejects the modern emphasis on the empirical, the rational, etc., by emphasizing subconscious or aleatory sources for art. On the other hand, Russian constructivism is committed to a practical use of art toward social progress (a modern ideal), and American precisionism finds beauty in the geometrical shapes of factories.