1. I have a parent case P which has default locking configured and has a child case C1. If i lock P, will it also lock C1 in default locking? -> In this case the child object will also be locked
2. If i lock C1, will it lock P as well? -> It depends on the setting you choose in the child case whether to lock the parent case or not which can be seen in Case > Advanced Tab > Do not lock the parent case when the child case is being performed checkbox.
Optimistic locking is the different locking mechanism which allows multiple operators to access the work object at a time without holding lock. The first operator who commits his work will get the lock and the second operator will be intimated with the alert stating that work object has been modified.
Whereas the Do not lock parent.. can be used in the default locking mechanism to restrict child case to be locked/not locked.
You won't get optimistic lock option in the child case if your parent case is using default. You will only get 'do not lock parent case' only in this scenario.
By default pega uses same locking mechanism in child case as the parent case. This locking mechanism inherits from parent to child. So if your parent case is using optimistic then child will also use same. If locking is default in parent, child will use the same, but you will get 'do not lock parent case' option in child case.