As Most of the answers have covered what synchronized means i want to add one extra point which isn't mentioned.
Synchronizing a method or enclosing a block with synchronized ensures that the operation/set of operations execute as a single atomic operation,to be precise when one thread is executing synchronize block on an object no other thread can enter the block until the thread one completes its execution and releases the lock it holds which it gets while entering the block.
So synchronize block ensure atomicity of bunch of code statements.
unlike what @lucifier specified ,Synchronizing and volatile doesn't serve the same purpose ,volatile is meant to ensure that two threads communicate with each other and get the most update value from the main memory instead of accesing a value from individual cache.it also ensures "happens before " behavior for a execution.
For example defining a variable as volatile(volatile int i=10;) an performing a increment operation (i++;)in an unsynchronized method doesnt give the same behavior when (i++) is enclosed in a synchronized block.