You can retrieve the user's IP address from the current request instance. For example, in a controller:
public function store(Request $request): mixed
{
$ipAddress = $request->ip();
}
To store the IP address, you could add a text column to your database table (i.e. $table->string('ip_address')->nullable() in your migration) and then fill that with what you get from $request->ip().
To determine the geolocation of the IP address, you'd need to use an external service/API. There are many of these out there; some are free and some are paid, all with different limits and accuracy. I've used IP-API before; it's free and doesn't require an API key.
There are also some Composer packages out there that make this easier to do in a Laravel application (abstracting the API calls and such), Google will be your friend here :)
If you can provide more details on what you want to store the IP address for, you might get some more concrete suggestions, as your question is a bit broad.