I have a this website
http://www.webtrainingcentre.com/
which is on web development tutorials.
My Question is Can I have multiple page with same keywords but different content for eg.
Here is a page that is tutorial on if/else condition in php
http://www.webtrainingcentre.com/php-tutorials/if-else-condition/
I want to create few pages like this
http://www.webtrainingcentre.com/php-exercise/if-else-condition/
http://www.webtrainingcentre.com/javascript-exercise/if-else-condition/
http://www.webtrainingcentre.com/php/if-else-condition/
All these pages will have different content which are needed and make sense
I am using the SEO Yoast plugin in wordpress which said you are using a duplicate keyword.
I want to know if Google will understand that these are different pages with different context/content and are needed by users or will it penalize me for using duplicate keywords in page titles and url's.
No, this would not be an issue. Google looks at your url, meta title and the content of your pages to understand what they are all about. If the content is sufficiently different between them, but they do share a couple of keywords, it is not going to be an issue at all. No worries.
At most, if the content is not specific at all, they might be considered near duplicate content, but you are not going to be penalized for that. At worst, such pages would not rank well.