How to receive data from specific device using wifi?

Hello. I am a beginner and I try to receive data from device using wifi?
The device has wifi module and send data if the app connect to this.
The app is either android or iphone.
I used hotspot but it seems that it is only for scanning wifi devices.
Thank you advance