After a brief free trial period, Nintendo Switch users will have to pay a recurring fee in order to play games online with their friends. The free trial for the Nintendo Switch Online Service will begin in March and end in Fall 2017.

At that time, you will need to pay in order to play online, similar to what Sony has with PlayStation Plus and Microsoft with Xbox Live Gold. Nintendo did also announce that paying subscribers will get access to free games.
Online Play on Nintendo Switch
You’ll be able to play compatible co-op and competitive games online by signing in with your Nintendo Account. Online play will be free for Nintendo Account holders until our paid online service launches in fall 2017.

Fall 2017
Online lobby and voice chat
Our new dedicated smart device app will connect to Nintendo Switch and let you invite friends to play online, set play appointments, and chat with friends during online matches in compatible games─all from your smart device.

A free, limited version of this app will be available for download in summer 2017.

Monthly game download
Subscribers will get to download and play a Nintendo Entertainment System™ (NES) or Super Nintendo Entertainment System™ (Super NES) game (with newly-added online play) for free for a month.

Exclusive deals
Special offers for subscribers may include discounts on select digital games and content.

There doesn't seem to be anything that indicates just how much this fee will be yet.