This is a big question. Please provide what you have already learned.
Mechanisms are highly dependent on assembly constraints. You create gear connections and servo motors. You run an analysis of the "profile" and you can play the results.
There are some very good tutorials on the PTC knowledge base website.