It is quite confusing for people who touch with Entity Framework the first time.
If you use Code First, an mdf file is generated at %USERPROFILE% (e.g. C:\Users\<username>).
If you use Database First, you create a database under SQL Server Object Explorer (not Server Explorer!), an mdf file will be generated at %LOCALAPPDATA%\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB.