You need to apply for a new fixed-term residence permit before your current permit expires. The application should be submitted in good time before you previous permit expires. Starting in 2017 all residence permit extension applications are received and processed by the Finnish Immigration Service.
You can apply for an extension online even if you didn't apply for your first permit on the e-service. It is not yet possible to apply for a permanent residence permit online.
If you are already in Finland, but don't have and haven't had a residence permit yet, you need to apply for a first residence permit. A visa is not a residence permit.