"We come from the restaurant."
Translation:Vi kommer från restaurangen.
ifrån can be used as an informal version of the preposition från, which is why you can use it in this sentence.
ifrån can also be an adverb or verb particle, and in that case, you can't use från instead. For instance there's a particle verb gå ifrån which means approximately 'leave'. You can't say från instead without changing the meaning with verbs like that.
In compound words they're not interchangeable.