You need to meet in person within the last two years. USCIS is really strict on that 24-month-period meeting. You also need to prove your relationship is genuine, and show evidence that you’ve been corresponding.
You need to be of legal age to marry in your state, and your fiancé needs to be legally available to marry you in their country, so prior marriages have to be cleared up. If you’re divorced there might be a time limit before you can remarry (for example in California). If there’s a time limit in your state, you must make sure that’s expired before you apply.
You also need to meet the financial requirements — 100% of the poverty level, which increases to 125% to obtain a green card once they get here.
Note, you must be a U.S. citizen to sponsor a K-1 visa. If you’re a green card holder you cannot sponsor a K-1 visa. You can get married and apply for a spousal visa as a green card holder, and it will take quite a bit longer, but it can be done.
Those are the basics. The K-1 visa is typically straightforward and provides a path to an eventual green card.