What is happening in an Azure Devops build and release?
Lets take this line by line:

My additions are added as comments.

trigger:
- master
# The branch you are building.

pool:
  vmImage: 'Ubuntu-16.04'
# The type of VM your code will run on.

variables:
  buildConfiguration: 'Release'
#This ends up defining which webconfig file to use.

steps:
- script: dotnet restore
  displayName: Restoring Dependencies

- script: dotnet build --configuration $(buildConfiguration)
  displayName: 'dotnet build $(buildConfiguration)'
# Builds your application
- task: DotNetCoreCLI@2
  displayName: Unit Tests
  inputs:
    command: test
    projects: '**/*Tests/*.csproj'
    arguments: '--configuration $(buildConfiguration)'
#Runs unit tests for your application
- task: DotNetCoreCLI@2
  displayName: Publishing
  inputs:
    command: publish
    publishWebProjects: True
    arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
    zipAfterPublish: True
#Pushes your application as an artifact (You'll be able to see it in your list of artifacts in Azure DevOps)
- task: PublishBuildArtifacts@1


As for your release script, you are forgetting to pass in the values so your release script isn't doing anything at the moment.
But when it does work, it will take the objects from your artifacts or container images and deploy them into your webapp the same way it would do it if you ran those commands from your local machine.