The data and indexes for all databases & tables will be stored in a single InnoDB tablespace which can comprise either a single file or multiple files. By default, the tablespace file(s) are stored in the server's data directory, i.e.:

path/to/mysql/data/

You can in fact copy the tablespace and format files from one server to another, but you should be aware that this will not allow you to transfer a specific database - as the tablespace file(s) encompass all databases. If you just want to transfer a single database, then use a separate utility. Other conditions that apply are as follows:

Both machines must use two's-compliment integer arithmetic
Either both machines must use IEEE floating-point format, or none of of the InnoDB tables must contain floating-point columns.
If you need to transfer between Windows & non-Windows operating systems, then you must use lowercase names for databases and tables.

If you are transferring MyISAM files, then you should also take precautions to ensure that the tables are not being used by any client processes when you perform the copy.

The best source of information on all this is the MySQL Reference documentation at:

Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.