Those are two different applications.
Xamarin.Forms
Xamarin.Forms is an open-source UI framework. Xamarin.Forms allows developers to build Android, iOS, and Windows applications from a single shared codebase.
WebApi Core
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the . NET Framework.
The first one is deployed on app stores and installed on devices.
The web api is deployed in web servers (like IIS) or on azure, and can be accessed over internet via http calls.
During development, you can build and deploy on your localhost. Check here for setup guidance: https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-3.1&tabs=visual-studio
You can consume your api from xamarin forms as described here:
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/web-services/rest
Example:
public async Task<List<TodoItem>> RefreshDataAsync ()
{
...
var uri = new Uri (string.Format (Constants.TodoItemsUrl, string.Empty));
...
var response = await _client.GetAsync (uri);
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync ();
Items = JsonConvert.DeserializeObject <List<TodoItem>> (content);
}
...
}