Framework is pre-developed code that you can reuse over and over to speed up development of complex systems. Ther eis nothing wrong with just coding what is needed, framework just helps you get there faster by reusing code.
oic.. is the php syntax similar in what is used in framework? is framework something like a library? like prototypejs and jquery?
A framework is like this. Over the course of 2 years you used the same custom user management system for most projects. You improve it over time. To this day, you use it for all membership sites you build, instead of coding custom user management systems everytime. That user management system is a framework. Php code is php code, all the same. The scripts you mentioned are not php, they are javascript.
Yes, similar, it's a collection of code or more like a skeleton to work with so a developer doesn't have to start from scratch every time. Usually it is a library of advanced or not so advanced scripts that help save time so you don't have to recode everything.