are both these two algorithms different from each other?
Yes. Different algorithms with different (invention) purposes: SHA256's goal was to be extremely hard to be collided, while Scrypt aimed to be a RAM and CPU heavy algorithm.
I read somewhere that this two algorithm is used for the different cryptocurrency. if that's true. then why?
Consider Bitcoin and Bitcoin Cash. Bitcoin Cash's hashrate is ~90% lower than Bitcoin's. However, profit maximizing miners switch to Bitcoin Cash when it's more profitable, and then jump back to Bitcoin. This causes Bitcoin Cash block times to be unstable, between 3 minutes and 60 minutes. If your coin uses a different kind of PoW, then that's not possible. Of course, you can improve the coin's difficulty algorithm to overcome these issues (DogeCoin is a little SHA256 coin, but its difficulty algorithm "DigiShield" is pretty great), however Litecoin prefers to use a different solution: to have a different PoW.
which one is efficient as compared to another one.
SHA256 in terms of energy and Hash / unit time.