Can someone sue another person if they do not live in the same state?

Yes, they can, but the court must have jurisdiction over the defendant (the person you sue). In general, the court will have jurisdiction if the defendant has some connection to the state you are suing in such that it is reasonable for the defendant to be forced into court in that state. For example, the defendant has a business in the state, or the lawsuit is about a product that the defendant sold in the state, or something the defendant did in his state had a predictable (and harmful) effect in the state where the lawsuit is brought.

You cannot sue a person in a state where that person has absolutely no connection (e.g., doesn't live here, has never been here, has no business connection here, etc.). Think of it this way: If the defendant injured you somehow in Nevada, you couldn't sue him in California (unless he or she lived in California too). But if a defendant standing in Nevada shot you with a gun and the bullet hit you in California, you could sue the defendant in California because the defendant intentionally caused harm in California, creating the necessary connection to the state.

In federal court you can sue a person in another state. This is because there is a type of jurisdiction particular to federal courts that is cdalled "diversity jurisdiction". This refers to the fact that the federal court is consideered to be the neutral territory for suit between citizens of different states. It dates back to an old their that courts in one state would be prejudiced against litigants from other states.

Another aspect of jurisdiction is "personal jurisdiction". This refers to the concept that a defendant must be served with precess (i.e. the summons and complaint) do that the court has jurisdiction over them. This is considered to be a due proce3ss right in that the person being sued has knowledge of the suit and is given the chance to defend.