How to send multiple instructions in one sms.

That code is for receiving text messages, not for sending them. Perhaps your thread title is wrong.

String received = "";

while(c=sms.read())
  received += c;

while statements should ALWAYS have curly braces, even if there is only one statement in the block.

After the code ends, there is something in received. What?

if
(received.compareTo("on lamb") == 0 )

The ( goes on the same line as the if statement.

I really don't think sompareTo() is the method you want to use. That tests that received contains exactly "on lamb". Look at the other members in the String class, such as indexOf(). The indexOf() method will tell you if receiver contains "on lamb", rather than is "on lamb".

You could send "on lamb; on lamc", and receiver.indexOf("on lamb") would return 0 and reciever.indexOf("on lamc") would return 9, while receiver.indexOf"cake and ice cream") would return -1. Any non-negative value indicates that the string search for was found.