Here are some examples with gerunds and infinitives in different grammatical functions:
1. Swimming is my favorite exercise for staying in shape.
2. I enjoy baking cookies on the weekends.
3. She wants to learn how to play the guitar.
4. To sleep in is one of my greatest pleasures on vacation.
5. After finishing my homework, I went outside to play.
6. Do you remember meeting my parents last year?