As we know, it is forbidden to write letters on Shabbat. However, the Terumat Ha’deshen (Rav Yisrael Isserlin, 1390-1460), in Siman 63, rules that this prohibition applies only to actual writing; it is permissible to simulate the act of writing with one’s finger or with an item that is not Mukseh. For example, if a person wants to practice his penmanship on Shabbat, he may take an object – such as the pointer for the Sefer Torah – and make the motions in the air, or even on a surface, if no marks are left, to practice writing. The Terumat Ha’deshen writes that as long as no marks or traces are created by one’s motions, this is entirely permissible on Shabbat.
The Maharam Provincia (1:48) addresses the question of whether one may observe a non-Jew performing a task forbidden on Shabbat in order to learn how to perform that task. A contemporary example would be a person who is walking on Shabbat and sees a mechanic working on a car. Would he be allowed to watch the mechanic so he can learn how to do the job that is being done? The Maharam Provincia rules that although it is forbidden to speak about commercial and professional matters on Shabbat, it is permissible to think about such matters, and therefore one would be allowed to observe a workman to learn how to do the work. Accordingly, Hacham Ovadia rules (Laws of Shabbat, vol. 5, p. 152; listen to audio recording for precise citation) that one may observe a non-Jewish mechanic doing his work on Shabbat in order to learn the work. It must be emphasized, however, that this applies only in a case where one chances upon a mechanic; one certainly should not knowingly go to a mechanic on Shabbat to watch him work.
Summary: It is permissible on Shabbat to practice one’s penmanship by simulating the act of writing with a finger or non-Mikseh item in the air, or even on a surface as long as this does not leave marks. If one happens to see a non-Jewish mechanic working on Shabbat, he may stop to observe the work so he can learn how to perform that task.