In many wordpress blogs, we are seeing the code like below.

Now I want to put my code also like this? How to do it? is it belongs to any thrid party tool or is it in built comes with wordpress? When I copy and paste the code into blog it looking ugly. Please give me suggestion to make my blog more readable.
Thank you
If you are running your blog on WordPress.com, you just include the following lines before your code.
WordPress.com gives us the facility to avoid worrying about code highlighting. If your code is in between these blocks then it will automatically render as per the language you specified. It can support many languages.
Some of them are..
html
javascript
java
javafx
matlab (keywords only)
objc
perl
php
If you have a self-hosted site, or one hosted on wordpress.org, you should should use the SyntaxHighlighter plugin: wordpress.org/plugins/syntaxhighlighter.
This is the plugin the WordPress team sourced to create this functionality on wordpress.com
For more information see this link