Library is just a set of tools for you to use. It won't normally enforce a workflow on you and your code will be executing library code. Math is a good example of a library.
Framework enforces workflow as it is a working thing and only gives you extension points to put your code in and it will run your code and control things for you. For example you have no control when spring framework will call your controller. You are given guidelines on what you need to do for Spring to think your class is a controller.
The platform defines a standard around which a system can be developed. It will have a set of standard APIs that expose specific components (streams, file system, ports, etc) for your use. JVM is a good example of a platform as well as operating systems.