Copyright applies to creative expressions, not abstract ideas. Copying the general functionality of an application is not a copyright violation. Only copying the code, art assets etc. is.
However, under some circumstances, an idea can be patented. That is if that idea is a new "invention". It is possible for companies like Twitter or Instagram to protect certain features of their websites they invented using patents. In fact, Twitter does that. But patents have some limitations:
- They can only protect what's actually new. When someone did something like that before, then that is called "prior art" and it invalidates the patent. For example, you could not patent "A website that allows users to upload images" today, because websites that allow users to upload images have already been invented and exist for ages.
- And because you can't patent something that already exists, you have to be really specific in your patent description. Which means people can get around it by doing things slightly different than claimed in the patent. For example, if your patent says "Uploaded images are displayed on the left side of the screen", then someone could avoid infringing it by displaying uploaded images on the right side of the screen.
- Patents have a rather short expiration time. How long exactly depends on the country and the type of patent, but they are generally not longer than 20 years.