This feature is implemented at database level where the predicate filtering is done by an inline table function and then enforced by a security policy. RLS works when you connect directly to the database or through an application and since it works at query time no application changes need to occur. Another benefit of the logic residing in the database is that it reduces maintenance and complexity.
If you are trying out the feature and come across the error below, then it means you are using a SQL Database V2 server.
Msg 343, Level 15, State 1, Line <n>
Unknown object type 'SECURITY' used in a CREATE, DROP, or ALTER statement.
Msg 102, Level 15, State 1, Line <n+1>
Incorrect syntax near 'FILTER'.
RLS is available in SQL Server V12 and also SQL Server 2016 CTP.
Results of MSDN sample code- Each user see only their sales and the manager see all: