Both 还是 (háishì) and 或者 (huòzhě) mean “or” and are used to present a choice. However, 还是 can only be used when asking a question and 或者 can only be used in a declarative sentence.

还是 is used to offer choices in a question

When asking a question, 还是 can be used to provide choices or options.
Structure
This grammar pattern is fairly flexible. You can create all kinds of questions with 还是 using the following structure.

Examples

Nǐ xǐ huɑn zài jiā hái shì chū qu wán ?
你 喜欢 在 家 还是 出去 玩?
Do you like to stay in the house or go out to have fun?

还是 is used for questions that are embedded in sentences

Deciding whether or not to use 还是 becomes difficult with sentences that contain statements like “I don’t know,” “I want to know,” “I’m not sure,” etc. Alone, these statements are not technically questions. However, when used in a sentence that contains choices, these statements imply that a question must be answered. Therefore, you must use 还是
Examples

Wǒ bú zhī dào zhè běn shū shì tā de hái shì wǒ de .
我 不 知道 这本书 是 他的 还是 我的。
I don't know if this book is his or mine.

还是 is used to give suggestions

Structure
还是 can also be used to express the English words "ought to" or "had better". The use of 还是 implies that the there were originally two options and the speaker has decided on one. In this grammar structure, 还是 often comes before the verb and sometimes before the subject. 吧 is often placed at the end of the statement to emphasize that it is a suggestion.
Examples

Jīn tiān wǎn shɑnɡ wǒ tài mánɡ le , bù ké yǐ qù jiǔ bā
今天 晚上 我 太忙了,不可以 去 酒吧。我 还是 做 作业 吧。
I'm extremely busy tonight. I'd better do work.

或者 is used to give options in declarative sentences

或者 is used in declarative sentences in which options are presented.
Structure

The structure for 或者 and 还是 is the same, but the meaning, as well as the context in which 或者 is needed, is different.

Examples

Jīn tiān zhōnɡ wǔ wǒ chī sān mínɡ zhì huò zhě hàn bǎo.
今天 中午 我 吃 三明治 或者 汉堡。
Today at noon, I will eat a sandwich or a hamburger.

或者 can be repeated when providing options

Another easy way to use 或者 to give two options is to place 或者 before both options.
Structure

Almost anything can be placed after either 或者.
Examples

Zhǐ yǒu yī kuài dàn ɡāo , huò zhě nǐ chī huò zhě wǒ chī.
只 有 一 块 蛋糕,或者 你 吃 或者 我 吃。
There's only one piece of cake. Either you eat it, or I do.