Ok - an example..
I've used an Arduino Nano - receiving on a software UART (2) on pins D2 (Rx) and D3 (Tx - but not used)
UART1 - is the standard UART and is used to echo the messages received to the PC. (I use the interrupt on D2 (Int0) If you use a Mega - you can use the Rx interrupt for the port you use here..)
I used a FDTI convertor to transmit strings to the Nano (but this could be another Nano etc)
One problem - you have two different length strings ("Hello" and "Bye Bye") - so ideally need an 'end marker' to signal the end of the string. I used 0x0D (which is the return character sent by putty - you can use most anything in Send program (for example SendChar(0x0D) after sending the string)
The receive interrupt stores characters to the string (for which Hello is probably the wrong name now) - and sets a flag (rcv_string) to true if it gets an end of string marker (0x0D)
The Main loop echos the received string (if rcv_string is true) to UART (echoed to PC) and compares the string to "hello" (case is ignored) - turns on the inbuilt LED if a match.
It also compares the string to "bye bye" - and in this case turns off the LED.
Other strings are echoed but do not effect the LED state.
As an aside - I put the comparisons one after the other for clarity (you should probably move the second into the 'false' branch of the first - in this simple example it won't affect anything - but if there were lots of comparisons - there would be 'neater' (ie less coding) ways to do things)
If processing a 'command' was likely to take a long time - then the Rx interrupt should check if rcv_string is set and ignore (or some other action - buffer the command for later for example) the input until the flag is reset.
Martin