原来 (yuánlái) means "originally" (similar to 本来) or "former". It can also mean "all along", and can be used to indicate a sudden realization of something previously unknown, a bit like "so it's been like that all along, how could I not have realized?".

原来 as "all along"
Structure

Here 原来 means "all along".
Examples

Yuánlái shì nǐ ! Wǒ dōu méi rèn chū lái !
原来 是 你!我 都 没 认出来!
So it was you after all! I never imagined it.

The more formal expression 原来如此 can be used like 原来是这样 in example 3, to mean "oh, so it's like that is it?"

原来 as "originally"
Structure

Here 原来 means "originally" or "former".
Examples

Nǐ yuán lái de fā xínɡ hěn kě ài , jiǎn le tài kě xī le !
你 原来 的 发型 很 可爱, 剪 了 太 可惜 了!
Your original hairstyle was very cute. It's a shame that you cut it.