How difficult is it to practically detect a forgery in a cryptosystem? If the encryption key that you use doesn't correspond to the decryption key used by the crypto system, it is assumed that it will not be possible to decrypt the message or you'll know that there has been some mischief.
I wanted to know how will one know that the decrypted text is not correct? My point is that whether the decryption was successful or not can be checked by seeing if the either the decrypted text is same as what we expected it to be or follows the syntax of the language in which it was expected. Otherwise you will defintiely get SOME decrypted string. So how does a computer know that the decrypted string was not correct? Is it left to the programmer to check the correctness of the output?
Confidentiality does not imply authenticity.  Many common ciphers are trivially malleable—an attacker that doesn't know the key can nevertheless modify ciphertexts in ways that cause predictable changes to the plaintext.  Authenticated encryption solves this problem.


  I wanted to know how will one know that the decrypted text is not correct? My point is that whether the decryption was successful or not can be checked by seeing if the either the decrypted text is same as what we expected it to be or follows the syntax of the language in which it was expected.


There is no general criterion to be had here.  If the attacker has partial information about the plaintext (e.g., the language or protocol, the application that sends the message, the context in which the message was sent, etc.), they may be able to leverage this to produce an undetectable forgery.

Keep in mind that most encrypted data is not read by humans, but rather processed by computers, or as I like to call them, "error multiplication machines."  Attackers don't have to fool a human, only a computer—a fairly stupid machine that may act in very literal and potentially catastrophic manners when given unanticipated input, and which will happily do the wrong thing over and over and over.